head 1.27; access; symbols netbsd-10-0-RELEASE:1.27 netbsd-10-0-RC6:1.27 netbsd-10-0-RC5:1.27 netbsd-10-0-RC4:1.27 netbsd-10-0-RC3:1.27 netbsd-10-0-RC2:1.27 netbsd-10-0-RC1:1.27 netbsd-10:1.27.0.2 netbsd-10-base:1.27 netbsd-9-3-RELEASE:1.26 cjep_sun2x-base1:1.26 cjep_sun2x:1.26.0.8 cjep_sun2x-base:1.26 cjep_staticlib_x-base1:1.26 netbsd-9-2-RELEASE:1.26 cjep_staticlib_x:1.26.0.6 cjep_staticlib_x-base:1.26 netbsd-9-1-RELEASE:1.26 phil-wifi-20200421:1.26 phil-wifi-20200411:1.26 is-mlppp:1.26.0.4 is-mlppp-base:1.26 phil-wifi-20200406:1.26 netbsd-8-2-RELEASE:1.25 netbsd-9-0-RELEASE:1.26 netbsd-9-0-RC2:1.26 netbsd-9-0-RC1:1.26 phil-wifi-20191119:1.26 netbsd-9:1.26.0.2 netbsd-9-base:1.26 phil-wifi-20190609:1.26 netbsd-8-1-RELEASE:1.25 netbsd-8-1-RC1:1.25 pgoyette-compat-merge-20190127:1.25 pgoyette-compat-20190127:1.25 pgoyette-compat-20190118:1.25 pgoyette-compat-1226:1.25 pgoyette-compat-1126:1.25 pgoyette-compat-1020:1.25 pgoyette-compat-0930:1.25 pgoyette-compat-0906:1.25 netbsd-7-2-RELEASE:1.22.10.1 pgoyette-compat-0728:1.25 netbsd-8-0-RELEASE:1.25 phil-wifi:1.25.0.10 phil-wifi-base:1.25 pgoyette-compat-0625:1.25 netbsd-8-0-RC2:1.25 pgoyette-compat-0521:1.25 pgoyette-compat-0502:1.25 pgoyette-compat-0422:1.25 netbsd-8-0-RC1:1.25 pgoyette-compat-0415:1.25 pgoyette-compat-0407:1.25 pgoyette-compat-0330:1.25 pgoyette-compat-0322:1.25 pgoyette-compat-0315:1.25 netbsd-7-1-2-RELEASE:1.22.10.1 pgoyette-compat:1.25.0.8 pgoyette-compat-base:1.25 netbsd-7-1-1-RELEASE:1.22.10.1 matt-nb8-mediatek:1.25.0.6 matt-nb8-mediatek-base:1.25 perseant-stdc-iso10646:1.25.0.4 perseant-stdc-iso10646-base:1.25 netbsd-8:1.25.0.2 netbsd-8-base:1.25 prg-localcount2-base3:1.25 prg-localcount2-base2:1.24 prg-localcount2-base1:1.24 prg-localcount2:1.24.0.2 prg-localcount2-base:1.24 pgoyette-localcount-20170426:1.24 bouyer-socketcan-base1:1.24 pgoyette-localcount-20170320:1.24 netbsd-7-1:1.22.10.1.0.6 netbsd-7-1-RELEASE:1.22.10.1 netbsd-7-1-RC2:1.22.10.1 netbsd-7-nhusb-base-20170116:1.22.10.1 bouyer-socketcan:1.23.0.4 bouyer-socketcan-base:1.23 pgoyette-localcount-20170107:1.23 netbsd-7-1-RC1:1.22.10.1 pgoyette-localcount-20161104:1.23 netbsd-7-0-2-RELEASE:1.22.10.1 localcount-20160914:1.23 netbsd-7-nhusb:1.22.10.1.0.4 netbsd-7-nhusb-base:1.22.10.1 pgoyette-localcount-20160806:1.23 pgoyette-localcount-20160726:1.23 pgoyette-localcount:1.23.0.2 pgoyette-localcount-base:1.23 netbsd-7-0-1-RELEASE:1.22.10.1 netbsd-7-0:1.22.10.1.0.2 netbsd-7-0-RELEASE:1.22.10.1 netbsd-7-0-RC3:1.22.10.1 netbsd-7-0-RC2:1.22.10.1 netbsd-7-0-RC1:1.22.10.1 netbsd-5-2-3-RELEASE:1.21 netbsd-5-1-5-RELEASE:1.21 netbsd-6-0-6-RELEASE:1.21 netbsd-6-1-5-RELEASE:1.21 netbsd-7:1.22.0.10 netbsd-7-base:1.22 yamt-pagecache-base9:1.22 yamt-pagecache-tag8:1.21.48.1 netbsd-6-1-4-RELEASE:1.21 netbsd-6-0-5-RELEASE:1.21 tls-earlyentropy:1.22.0.8 tls-earlyentropy-base:1.22 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.22 riastradh-drm2-base3:1.22 netbsd-6-1-3-RELEASE:1.21 netbsd-6-0-4-RELEASE:1.21 netbsd-5-2-2-RELEASE:1.21 netbsd-5-1-4-RELEASE:1.21 netbsd-6-1-2-RELEASE:1.21 netbsd-6-0-3-RELEASE:1.21 netbsd-5-2-1-RELEASE:1.21 netbsd-5-1-3-RELEASE:1.21 netbsd-6-1-1-RELEASE:1.21 riastradh-drm2-base2:1.22 riastradh-drm2-base1:1.22 riastradh-drm2:1.22.0.2 riastradh-drm2-base:1.22 netbsd-6-1:1.21.0.60 netbsd-6-0-2-RELEASE:1.21 netbsd-6-1-RELEASE:1.21 khorben-n900:1.22.0.6 netbsd-6-1-RC4:1.21 netbsd-6-1-RC3:1.21 agc-symver:1.22.0.4 agc-symver-base:1.22 netbsd-6-1-RC2:1.21 netbsd-6-1-RC1:1.21 yamt-pagecache-base8:1.22 netbsd-5-2:1.21.0.58 netbsd-6-0-1-RELEASE:1.21 yamt-pagecache-base7:1.21 netbsd-5-2-RELEASE:1.21 netbsd-5-2-RC1:1.21 matt-nb6-plus-nbase:1.21 yamt-pagecache-base6:1.21 netbsd-6-0:1.21.0.56 netbsd-6-0-RELEASE:1.21 netbsd-6-0-RC2:1.21 tls-maxphys:1.21.0.54 tls-maxphys-base:1.22 matt-nb6-plus:1.21.0.52 matt-nb6-plus-base:1.21 netbsd-6-0-RC1:1.21 yamt-pagecache-base5:1.21 yamt-pagecache-base4:1.21 netbsd-6:1.21.0.50 netbsd-6-base:1.21 netbsd-5-1-2-RELEASE:1.21 netbsd-5-1-1-RELEASE:1.21 yamt-pagecache-base3:1.21 yamt-pagecache-base2:1.21 yamt-pagecache:1.21.0.48 yamt-pagecache-base:1.21 cherry-xenmp:1.21.0.46 cherry-xenmp-base:1.21 bouyer-quota2-nbase:1.21 bouyer-quota2:1.21.0.44 bouyer-quota2-base:1.21 matt-mips64-premerge-20101231:1.21 matt-nb5-mips64-premerge-20101231:1.21 matt-nb5-pq3:1.21.0.42 matt-nb5-pq3-base:1.21 netbsd-5-1:1.21.0.40 WFJ-920714:1.1.1 netbsd-5-1-RELEASE:1.21 netbsd-5-1-RC4:1.21 matt-nb5-mips64-k15:1.21 netbsd-5-1-RC3:1.21 netbsd-5-1-RC2:1.21 netbsd-5-1-RC1:1.21 netbsd-5-0-2-RELEASE:1.21 matt-nb5-mips64-premerge-20091211:1.21 matt-premerge-20091211:1.21 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.21 matt-nb4-mips64-k7-u2a-k9b:1.21 matt-nb5-mips64-u1-k1-k5:1.21 matt-nb5-mips64:1.21.0.38 netbsd-5-0-1-RELEASE:1.21 jym-xensuspend-nbase:1.21 netbsd-5-0:1.21.0.36 netbsd-5-0-RELEASE:1.21 netbsd-5-0-RC4:1.21 netbsd-5-0-RC3:1.21 netbsd-5-0-RC2:1.21 jym-xensuspend:1.21.0.34 jym-xensuspend-base:1.21 netbsd-5-0-RC1:1.21 netbsd-5:1.21.0.32 netbsd-5-base:1.21 matt-mips64-base2:1.21 matt-mips64:1.21.0.30 mjf-devfs2:1.21.0.28 mjf-devfs2-base:1.21 netbsd-4-0-1-RELEASE:1.21 wrstuden-revivesa-base-3:1.21 wrstuden-revivesa-base-2:1.21 wrstuden-fixsa-newbase:1.21 wrstuden-revivesa-base-1:1.21 yamt-pf42-base4:1.21 yamt-pf42-base3:1.21 hpcarm-cleanup-nbase:1.21 yamt-pf42-baseX:1.21 yamt-pf42-base2:1.21 wrstuden-revivesa:1.21.0.26 wrstuden-revivesa-base:1.21 yamt-pf42:1.21.0.24 yamt-pf42-base:1.21 keiichi-mipv6:1.21.0.22 keiichi-mipv6-base:1.21 matt-armv6-nbase:1.21 matt-armv6-prevmlocking:1.21 wrstuden-fixsa-base-1:1.21 netbsd-4-0:1.21.0.20 netbsd-4-0-RELEASE:1.21 cube-autoconf:1.21.0.18 cube-autoconf-base:1.21 netbsd-4-0-RC5:1.21 netbsd-4-0-RC4:1.21 netbsd-4-0-RC3:1.21 netbsd-4-0-RC2:1.21 netbsd-4-0-RC1:1.21 matt-armv6:1.21.0.16 matt-armv6-base:1.21 matt-mips64-base:1.21 hpcarm-cleanup:1.21.0.14 hpcarm-cleanup-base:1.21 netbsd-3-1-1-RELEASE:1.21 netbsd-3-0-3-RELEASE:1.21 wrstuden-fixsa:1.21.0.12 wrstuden-fixsa-base:1.21 abandoned-netbsd-4-base:1.21 abandoned-netbsd-4:1.21.0.6 netbsd-3-1:1.21.0.8 netbsd-3-1-RELEASE:1.21 netbsd-3-0-2-RELEASE:1.21 netbsd-3-1-RC4:1.21 netbsd-3-1-RC3:1.21 netbsd-3-1-RC2:1.21 netbsd-3-1-RC1:1.21 netbsd-4:1.21.0.10 netbsd-4-base:1.21 netbsd-3-0-1-RELEASE:1.21 netbsd-3-0:1.21.0.4 netbsd-3-0-RELEASE:1.21 netbsd-3-0-RC6:1.21 netbsd-3-0-RC5:1.21 netbsd-3-0-RC4:1.21 netbsd-3-0-RC3:1.21 netbsd-3-0-RC2:1.21 netbsd-3-0-RC1:1.21 netbsd-2-0-3-RELEASE:1.19 netbsd-2-1:1.19.0.6 netbsd-2-1-RELEASE:1.19 netbsd-2-1-RC6:1.19 netbsd-2-1-RC5:1.19 netbsd-2-1-RC4:1.19 netbsd-2-1-RC3:1.19 netbsd-2-1-RC2:1.19 netbsd-2-1-RC1:1.19 netbsd-2-0-2-RELEASE:1.19 netbsd-3:1.21.0.2 netbsd-3-base:1.21 netbsd-2-0-1-RELEASE:1.19 netbsd-2:1.19.0.4 netbsd-2-base:1.19 netbsd-2-0-RELEASE:1.19 netbsd-2-0-RC5:1.19 netbsd-2-0-RC4:1.19 netbsd-2-0-RC3:1.19 netbsd-2-0-RC2:1.19 netbsd-2-0-RC1:1.19 netbsd-2-0:1.19.0.2 netbsd-2-0-base:1.19 netbsd-1-6-PATCH002-RELEASE:1.15 netbsd-1-6-PATCH002:1.15 netbsd-1-6-PATCH002-RC4:1.15 netbsd-1-6-PATCH002-RC3:1.15 netbsd-1-6-PATCH002-RC2:1.15 netbsd-1-6-PATCH002-RC1:1.15 netbsd-1-6-PATCH001:1.15 netbsd-1-6-PATCH001-RELEASE:1.15 netbsd-1-6-PATCH001-RC3:1.15 netbsd-1-6-PATCH001-RC2:1.15 netbsd-1-6-PATCH001-RC1:1.15 fvdl_fs64_base:1.16 netbsd-1-6-RELEASE:1.15 netbsd-1-6-RC3:1.15 netbsd-1-6-RC2:1.15 netbsd-1-6-RC1:1.15 netbsd-1-6:1.15.0.8 netbsd-1-6-base:1.15 netbsd-1-5-PATCH003:1.15 ELRICshvfork:1.15.0.6 ELRICshvfork-base:1.15 netbsd-1-5-PATCH002:1.15 netbsd-1-5-PATCH001:1.15 netbsd-1-5-RELEASE:1.15 netbsd-1-5-BETA2:1.15 netbsd-1-5-BETA:1.15 netbsd-1-4-PATCH003:1.14.4.1 netbsd-1-5-ALPHA2:1.15 netbsd-1-5:1.15.0.4 netbsd-1-5-base:1.15 minoura-xpg4dl:1.15.0.2 minoura-xpg4dl-base:1.15 netbsd-1-4-PATCH002:1.14 wrstuden-devbsize-19991221:1.14 wrstuden-devbsize:1.14.0.8 wrstuden-devbsize-base:1.14 comdex-fall-1999:1.14.0.6 comdex-fall-1999-base:1.14 netbsd-1-4-PATCH001:1.14 netbsd-1-4-RELEASE:1.14 netbsd-1-4:1.14.0.4 netbsd-1-4-base:1.14 netbsd-1-3-PATCH003:1.14 netbsd-1-3-PATCH003-CANDIDATE2:1.14 netbsd-1-3-PATCH003-CANDIDATE1:1.14 netbsd-1-3-PATCH003-CANDIDATE0:1.14 netbsd-1-3-PATCH002:1.14 netbsd-1-3-PATCH001:1.14 netbsd-1-3-RELEASE:1.14 netbsd-1-3-BETA:1.14 netbsd-1-3:1.14.0.2 netbsd-1-3-base:1.14 netbsd-1-2-PATCH001:1.12.6.1 netbsd-1-2-RELEASE:1.12 netbsd-1-2-BETA:1.12 netbsd-1-2-base:1.12 netbsd-1-2:1.12.0.6 netbsd-1-1-PATCH001:1.12 netbsd-1-1-RELEASE:1.12 netbsd-1-1:1.12.0.2 netbsd-1-1-base:1.12 netbsd-1-0-PATCH06:1.9 netbsd-1-0-PATCH05:1.9 netbsd-1-0-PATCH04:1.9 netbsd-1-0-PATCH03:1.9 netbsd-1-0-PATCH02:1.9 netbsd-1-0-PATCH1:1.9 netbsd-1-0-PATCH0:1.9 netbsd-1-0-RELEASE:1.9 netbsd-1-0:1.9.0.2 netbsd-1-0-base:1.9; locks; strict; comment @# @; 1.27 date 2021.11.10.18.25.52; author kre; state Exp; branches; next 1.26; commitid AaOGpfYxuqLOghgD; 1.26 date 2019.02.14.11.15.24; author kre; state Exp; branches; next 1.25; commitid og7i04xXJ1kt0JbB; 1.25 date 2017.05.15.20.00.36; author kre; state Exp; branches 1.25.10.1; next 1.24; commitid 4EwVGBzEIkJnvwRz; 1.24 date 2017.02.02.20.00.40; author christos; state Exp; branches 1.24.2.1; next 1.23; commitid FV7Vp8x26V2MNpEz; 1.23 date 2015.05.10.20.30.54; author joerg; state Exp; branches 1.23.2.1 1.23.4.1; next 1.22; commitid arIfWCXHX1OvlWky; 1.22 date 2012.12.31.14.10.15; author dsl; state Exp; branches 1.22.10.1; next 1.21; 1.21 date 2004.07.13.15.05.59; author seb; state Exp; branches 1.21.48.1 1.21.54.1; next 1.20; 1.20 date 2004.06.06.07.03.11; author christos; state Exp; branches; next 1.19; 1.19 date 2003.08.22.14.21.12; author itojun; state Exp; branches; next 1.18; 1.18 date 2003.08.22.11.22.23; author agc; state Exp; branches; next 1.17; 1.17 date 2003.05.04.01.05.24; author gmcgarry; state Exp; branches; next 1.16; 1.16 date 2002.11.24.22.35.39; author christos; state Exp; branches; next 1.15; 1.15 date 2000.04.09.23.27.03; author christos; state Exp; branches; next 1.14; 1.14 date 97.03.14.01.42.18; author christos; state Exp; branches 1.14.4.1; next 1.13; 1.13 date 97.02.06.23.24.52; author christos; state Exp; branches; next 1.12; 1.12 date 95.05.11.21.28.48; author christos; state Exp; branches 1.12.6.1; next 1.11; 1.11 date 95.03.21.09.08.47; author cgd; state Exp; branches; next 1.10; 1.10 date 94.11.04.17.13.30; author jtc; state Exp; branches; next 1.9; 1.9 date 94.06.11.16.11.43; author mycroft; state Exp; branches; next 1.8; 1.8 date 94.05.14.22.20.11; author cgd; state Exp; branches; next 1.7; 1.7 date 94.05.11.17.42.57; author jtc; state Exp; branches; next 1.6; 1.6 date 94.05.11.17.14.23; author jtc; state Exp; branches; next 1.5; 1.5 date 94.05.11.17.09.45; author jtc; state Exp; branches; next 1.4; 1.4 date 93.07.07.01.11.56; author jtc; state Exp; branches; next 1.3; 1.3 date 93.03.23.00.27.35; author cgd; state Exp; branches; next 1.2; 1.2 date 93.03.22.08.04.00; author cgd; state Exp; branches; next 1.1; 1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches 1.1.1.1; next ; 1.25.10.1 date 2019.06.10.21.41.03; author christos; state Exp; branches; next 1.25.10.2; commitid jtc8rnCzWiEEHGqB; 1.25.10.2 date 2020.04.21.18.41.06; author martin; state dead; branches; next 1.25.10.3; commitid 86tA4aEmdr3VCh5C; 1.25.10.3 date 2020.04.21.19.37.34; author martin; state Exp; branches; next ; commitid x6IB64bYH9UmWh5C; 1.24.2.1 date 2017.05.19.00.22.50; author pgoyette; state Exp; branches; next ; commitid QNTxgGjVagwoSVRz; 1.23.2.1 date 2017.03.20.06.51.32; author pgoyette; state Exp; branches; next ; commitid jjw7cAwgyKq7RfKz; 1.23.4.1 date 2017.04.21.16.50.42; author bouyer; state Exp; branches; next ; commitid dUG7nkTKALCadqOz; 1.22.10.1 date 2015.06.04.07.35.25; author msaitoh; state Exp; branches; next ; commitid uhIvzU2zYv82g5oy; 1.21.48.1 date 2013.01.23.00.04.05; author yamt; state Exp; branches; next ; 1.21.54.1 date 2013.02.25.00.23.52; author tls; state Exp; branches; next ; 1.14.4.1 date 2000.06.03.14.28.12; author he; state Exp; branches; next ; 1.12.6.1 date 97.03.04.15.18.08; author mycroft; state Exp; branches; next ; 1.1.1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 94.05.11.17.02.45; author jtc; state Exp; branches; next ; desc @@ 1.27 log @ Ensure that all of the POSIX standard utilities are correctly identified with the -u flag (that is, I hope I identified all the ones that were missing it). This change is a no-op (NFC) as the -u flag does nothing. Still, just in case we find a use for it one day, and just as a matter of general principle, we should get this correct. @ text @#!/bin/sh - # $NetBSD: builtins.def,v 1.26 2019/02/14 11:15:24 kre Exp $ # # Copyright (c) 1991, 1993 # The Regents of the University of California. All rights reserved. # # This code is derived from software contributed to Berkeley by # Kenneth Almquist. # # 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. 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. # # @@(#)builtins.def 8.4 (Berkeley) 5/4/95 # # This file lists all the builtin commands. The first column is the name # of a C routine. # The -j flag specifies that this command is to be excluded from systems # without job control. # The -h flag specifies that this command is to be excluded from systems # based on the SMALL compile-time symbol. # The -s flag specifies that this is a posix 'special builtin' command. # The -u flag specifies that this is a posix 'standard utility'. # The rest of the line specifies the command name or names used to run # the command. bltincmd -u command bgcmd -j -u bg breakcmd -s break -s continue cdcmd -u cd chdir dotcmd -s . echocmd -u echo evalcmd -s eval execcmd -s exec exitcmd -s exit expcmd exp let exportcmd -s export -s readonly falsecmd -u false histcmd -h -u fc inputrc inputrc fgcmd -j -u fg fgcmd_percent -j -u % getoptscmd -u getopts hashcmd -u hash jobidcmd jobid jobscmd -u jobs localcmd local #ifndef TINY printfcmd -u printf #endif pwdcmd -u pwd readcmd -u read returncmd -s return setcmd -s set fdflagscmd fdflags setvarcmd setvar shiftcmd -s shift #ifndef SMALL specialvarcmd specialvar #endif timescmd -s times trapcmd -s trap truecmd -s : -u true typecmd -u type umaskcmd -u umask unaliascmd -u unalias unsetcmd -s unset waitcmd -u wait aliascmd -u alias ulimitcmd -u ulimit testcmd -u test -u [ killcmd -u kill # mandated by posix for 'kill %job' wordexpcmd wordexp #newgrp -u newgrp # optional command in posix #exprcmd -u expr # not currently built in, but could be #ifdef DEBUG debugcmd debug #endif @ 1.26 log @ Add the "specialvar" built-in command. Discussed (well, mentioned anway) on tech-userlevel with no adverse response. This allows the magic of vars like HOSTNAME SECONDS, ToD (etc) to be restored should it be lost - perhaps by having a var of the same name imported from the environment (which needs to remove the magic in case a set of scripts are using the env to pass data, and the var name chosen happens to be one of our magic ones). No change to SMALL shells (or smaller) - none of the magic vars (except LINENO, which is exempt from all of this) exist in those, hence such a shell has no need for this command either. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.25 2017/05/15 20:00:36 kre Exp $ d53 1 a53 1 echocmd echo d65 1 a65 1 hashcmd hash d70 1 a70 1 printfcmd printf d85 1 a85 1 typecmd type d91 2 a92 2 ulimitcmd ulimit testcmd test [ d96 1 a100 2 #exprcmd expr @ 1.25 log @ DEBUG mode shell update (changes nothing for shells which are not compiled for DEBUG.) Add debug builtin command, and corresponding -D command line option. As usual, for DEBUG related stuff, read the source for info, that's all there is about this. This completes the infrastructure changes for the updated DEBUG TRACE mechanism, so now converting the rest of the shell's internal tracing can happen as desired - piecemeal. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.24 2017/02/02 20:00:40 christos Exp $ d79 3 @ 1.25.10.1 log @Sync with HEAD @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.26 2019/02/14 11:15:24 kre Exp $ a78 3 #ifndef SMALL specialvarcmd specialvar #endif @ 1.25.10.2 log @Sync with HEAD @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.25.10.1 2019/06/10 21:41:03 christos Exp $ @ 1.25.10.3 log @Ooops, restore accidently removed files from merge mishap @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.26 2019/02/14 11:15:24 kre Exp $ @ 1.24 log @Add fdflags builtin. Discussed with Chet and he has implemented it for bash too. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.23 2015/05/10 20:30:54 joerg Exp $ d94 4 @ 1.24.2.1 log @Resolve conflicts from previous merge (all resulting from $NetBSD keywork expansion) @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.25 2017/05/15 20:00:36 kre Exp $ a93 4 #ifdef DEBUG debugcmd debug #endif @ 1.23 log @Include printf by default even for SMALL builds. It is used e.g. by dhcpcd and as such required by most ramdisk images. Allow turning it off again by TINYPROG. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.22 2012/12/31 14:10:15 dsl Exp $ d76 1 @ 1.23.4.1 log @Sync with HEAD @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.24 2017/02/02 20:00:40 christos Exp $ a75 1 fdflagscmd fdflags @ 1.23.2.1 log @Sync with HEAD @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.24 2017/02/02 20:00:40 christos Exp $ a75 1 fdflagscmd fdflags @ 1.22 log @Add support for '%n' being a shorthand for 'fg %n'. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.21 2004/07/13 15:05:59 seb Exp $ d69 1 a69 1 #ifndef SMALL @ 1.22.10.1 log @Pull up following revision(s) (requested by martin in ticket #821): bin/sh/builtins.def: revision 1.23 bin/sh/Makefile: revision 1.101 Include printf by default even for SMALL builds. It is used e.g. by dhcpcd and as such required by most ramdisk images. Allow turning it off again by TINYPROG. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.22 2012/12/31 14:10:15 dsl Exp $ d69 1 a69 1 #ifndef TINY @ 1.21 log @Add new builtin `wordexp' to support wordexp(3). From FreeBSD. Provided in PR lib/26123. Approved by kleink@@. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.20 2004/06/06 07:03:11 christos Exp $ d63 1 @ 1.21.54.1 log @resync with head @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.21 2004/07/13 15:05:59 seb Exp $ a62 1 fgcmd_percent -j -u % @ 1.21.48.1 log @sync with head @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.21 2004/07/13 15:05:59 seb Exp $ a62 1 fgcmd_percent -j -u % @ 1.20 log @don't include the printf builtin if we are SMALL; saves 10K. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.19 2003/08/22 14:21:12 itojun Exp $ d89 1 @ 1.19 log @remove \r (agc, are you using MS-DOS?) @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.18 2003/08/22 11:22:23 agc Exp $ d68 1 d70 1 @ 1.18 log @Move 4 more files from UCB 4 clause to 3 clause licence. Thanks to Julio Merino for pointing them out. @ text @d1 89 a89 89 #!/bin/sh - # $NetBSD: builtins.def,v 1.17 2003/05/04 01:05:24 gmcgarry Exp $ # # Copyright (c) 1991, 1993 # The Regents of the University of California. All rights reserved. # # This code is derived from software contributed to Berkeley by # Kenneth Almquist. # # 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. 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. # # @@(#)builtins.def 8.4 (Berkeley) 5/4/95 # # This file lists all the builtin commands. The first column is the name # of a C routine. # The -j flag specifies that this command is to be excluded from systems # without job control. # The -h flag specifies that this command is to be excluded from systems # based on the SMALL compile-time symbol. # The -s flag specifies that this is a posix 'special builtin' command. # The -u flag specifies that this is a posix 'standard utility'. # The rest of the line specifies the command name or names used to run # the command. bltincmd -u command bgcmd -j -u bg breakcmd -s break -s continue cdcmd -u cd chdir dotcmd -s . echocmd echo evalcmd -s eval execcmd -s exec exitcmd -s exit expcmd exp let exportcmd -s export -s readonly falsecmd -u false histcmd -h -u fc inputrc inputrc fgcmd -j -u fg getoptscmd -u getopts hashcmd hash jobidcmd jobid jobscmd -u jobs localcmd local printfcmd printf pwdcmd -u pwd readcmd -u read returncmd -s return setcmd -s set setvarcmd setvar shiftcmd -s shift timescmd -s times trapcmd -s trap truecmd -s : -u true typecmd type umaskcmd -u umask unaliascmd -u unalias unsetcmd -s unset waitcmd -u wait aliascmd -u alias ulimitcmd ulimit testcmd test [ killcmd -u kill # mandated by posix for 'kill %job' #newgrp -u newgrp # optional command in posix #exprcmd expr @ 1.17 log @Add new builtin 'inputrc' which allows keybindings to be redefined for the current shell. From Arne H Juul in PR#10097. @ text @d1 89 a89 93 #!/bin/sh - # $NetBSD: builtins.def,v 1.16 2002/11/24 22:35:39 christos Exp $ # # Copyright (c) 1991, 1993 # The Regents of the University of California. All rights reserved. # # This code is derived from software contributed to Berkeley by # Kenneth Almquist. # # 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. # # @@(#)builtins.def 8.4 (Berkeley) 5/4/95 # # This file lists all the builtin commands. The first column is the name # of a C routine. # The -j flag specifies that this command is to be excluded from systems # without job control. # The -h flag specifies that this command is to be excluded from systems # based on the SMALL compile-time symbol. # The -s flag specifies that this is a posix 'special builtin' command. # The -u flag specifies that this is a posix 'standard utility'. # The rest of the line specifies the command name or names used to run # the command. bltincmd -u command bgcmd -j -u bg breakcmd -s break -s continue cdcmd -u cd chdir dotcmd -s . echocmd echo evalcmd -s eval execcmd -s exec exitcmd -s exit expcmd exp let exportcmd -s export -s readonly falsecmd -u false histcmd -h -u fc inputrc inputrc fgcmd -j -u fg getoptscmd -u getopts hashcmd hash jobidcmd jobid jobscmd -u jobs localcmd local printfcmd printf pwdcmd -u pwd readcmd -u read returncmd -s return setcmd -s set setvarcmd setvar shiftcmd -s shift timescmd -s times trapcmd -s trap truecmd -s : -u true typecmd type umaskcmd -u umask unaliascmd -u unalias unsetcmd -s unset waitcmd -u wait aliascmd -u alias ulimitcmd ulimit testcmd test [ killcmd -u kill # mandated by posix for 'kill %job' #newgrp -u newgrp # optional command in posix #exprcmd expr @ 1.16 log @Fixes from David Laight: - ansification - format of output of jobs command (etc) - job identiers %+, %- etc - $? and $(...) - correct quoting of output of set, export -p and readonly -p - differentiation between nornal and 'posix special' builtins - correct behaviour (posix) for errors on builtins and special builtins - builtin printf and kill - set -o debug (if compiled with DEBUG) - cd src obj (as ksh - too useful to do without) - unset -e name, remove non-readonly variable from export list. (so I could unset -e PS1 before running the test shell...) @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.15 2000/04/09 23:27:03 christos Exp $ d65 1 @ 1.15 log @PR/9847: Geoff C. Wing: Make test(1) a builtin. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.14 1997/03/14 01:42:18 christos Exp $ d42 9 a50 9 # of a C routine. The -j flag, if present, specifies that this command # is to be excluded from systems without job control, and the -h flag, # if present specifies that this command is to be excluded from systems # based on the SMALL compile-time symbol. The rest of the line # specifies the command name or names used to run the command. The entry # for bltincmd, which is run when the user does not specify a command, must # come first. # # NOTE: bltincmd must come first! d52 5 a56 7 bltincmd command #alloccmd alloc bgcmd -j bg breakcmd break continue #catfcmd catf cdcmd cd chdir dotcmd . d58 3 a60 3 evalcmd eval execcmd exec exitcmd exit d62 5 a66 6 exportcmd export readonly #exprcmd expr falsecmd false histcmd -h fc fgcmd -j fg getoptscmd getopts d69 1 a69 2 jobscmd jobs #linecmd line d71 5 a75 6 #nlechocmd nlecho #printfcmd printf pwdcmd pwd readcmd read returncmd return setcmd set d77 4 a80 3 shiftcmd shift trapcmd trap truecmd : true d82 5 a86 6 umaskcmd umask unaliascmd unalias unsetcmd unset waitcmd wait #foocmd foo aliascmd alias d89 4 @ 1.14 log @NO_HISTORY->SMALL @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.13 1997/02/06 23:24:52 christos Exp $ d65 1 a65 1 #exprcmd expr test [ d93 1 @ 1.14.4.1 log @Pull up revision 1.15 (requested by he): Enable test as a shell builtin. Fixes PR#9847. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.14 1997/03/14 01:42:18 christos Exp $ d65 1 a65 1 #exprcmd expr a92 1 testcmd test [ @ 1.13 log @add type builtin. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.12 1995/05/11 21:28:48 christos Exp $ d45 1 a45 1 # based on the NO_HISTORY compile-time symbol. The rest of the line @ 1.12 log @Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 bug. @ text @d2 1 a2 1 # $NetBSD$ d85 1 @ 1.12.6.1 log @Pull up latest sh(1). Fixes yet more bugs. @ text @d2 1 a2 1 # $NetBSD: builtins.def,v 1.12 1995/05/11 21:28:48 christos Exp $ a84 1 typecmd type @ 1.11 log @convert to new RCS id conventions. @ text @d38 1 a38 1 # @@(#)builtins 8.1 (Berkeley) 5/31/93 a48 4 # # Copyright (C) 1989 by Kenneth Almquist. All rights reserved. # This file is part of ash, which is distributed under the terms specified # by the Ash General Public License. See the file named LICENSE. @ 1.10 log @ulimit builtin (PR #388) This public domain code, originally by Doug Gwyn, Doug Kingston, Eric Gisin, and Michael Rendell was ripped from pdksh 5.0.8 and hacked for use with ash. @ text @d2 1 d38 1 a38 2 # from: @@(#)builtins 8.1 (Berkeley) 5/31/93 # $Id: builtins.def,v 1.9 1994/06/11 16:11:43 mycroft Exp $ @ 1.9 log @Add RCS ids. @ text @d38 1 a38 1 # $Id: $ d95 1 @ 1.8 log @add back in support for building w/o obj dir. also, add NO_HISTORY define, which (if you invoke mkbuiltins properly) gets you a sh w/o history of command line editing (for floppy sh). @ text @d37 2 a38 1 # @@(#)builtins 8.1 (Berkeley) 5/31/93 @ 1.7 log @reintegrate NetBSD's false builtin @ text @d42 3 a44 1 # is to be excluded from systems without job control. The rest of the line d70 1 a70 1 histcmd fc @ 1.6 log @temporarily disable printf builtin @ text @d67 1 @ 1.5 log @sync with 4.4lite @ text @d76 1 a76 1 printfcmd printf @ 1.4 log @IEEE 1003.2 (D11.2.2.3) requires that the system's true and false be accessed instead of searching $PATH. The best way to satisfy this requirement is to make them builtins. True was allready builtin, this patch adds false. @ text @d3 2 a4 2 # Copyright (c) 1991 The Regents of the University of California. # All rights reserved. d37 1 a37 3 # @@(#)builtins 5.1 (Berkeley) 3/7/91 # # $Header: /b/source/CVS/src/bin/sh/builtins,v 1.3 1993/03/23 00:27:35 cgd Exp $ d44 1 a44 1 # for nullcmd, which is run when the user does not specify a command, must d50 2 d64 1 d67 1 a67 1 falsecmd false a72 1 lccmd lc d76 1 d86 1 d89 2 @ 1.3 log @changed "Id" to "Header" for rcsids @ text @d39 1 a39 1 # $Header: builtins,v 1.2 93/03/22 08:10:10 cgd Exp $ d66 1 @ 1.2 log @added rcs ids to all files @ text @d39 1 a39 1 # $Id: builtins,v 1.2 93/03/21 22:14:09 cgd Exp $ @ 1.1 log @Initial revision @ text @d38 2 @ 1.1.1.1 log @initial import of 386bsd-0.1 sources @ text @@ 1.1.1.2 log @44lite code @ text @d3 2 a4 2 # Copyright (c) 1991, 1993 # The Regents of the University of California. All rights reserved. d37 1 a37 1 # @@(#)builtins 8.1 (Berkeley) 5/31/93 d44 1 a44 1 # for bltincmd, which is run when the user does not specify a command, must a49 2 # # NOTE: bltincmd must come first! a61 1 expcmd exp let a63 1 histcmd fc d69 1 a72 1 printfcmd printf a81 1 unaliascmd unalias a83 2 #foocmd foo aliascmd alias @