xref: /netbsd-src/bin/sh/builtins.def (revision d1c86d363ded009f6c33bcf689f64a39b49f56b7)
161f28255Scgd#!/bin/sh -
2*d1c86d36Skre#	$NetBSD: builtins.def,v 1.29 2024/10/09 13:43:32 kre Exp $
361f28255Scgd#
437ed7877Sjtc# Copyright (c) 1991, 1993
537ed7877Sjtc#	The Regents of the University of California.  All rights reserved.
661f28255Scgd#
761f28255Scgd# This code is derived from software contributed to Berkeley by
861f28255Scgd# Kenneth Almquist.
961f28255Scgd#
1061f28255Scgd# Redistribution and use in source and binary forms, with or without
1161f28255Scgd# modification, are permitted provided that the following conditions
1261f28255Scgd# are met:
1361f28255Scgd# 1. Redistributions of source code must retain the above copyright
1461f28255Scgd#    notice, this list of conditions and the following disclaimer.
1561f28255Scgd# 2. Redistributions in binary form must reproduce the above copyright
1661f28255Scgd#    notice, this list of conditions and the following disclaimer in the
1761f28255Scgd#    documentation and/or other materials provided with the distribution.
183538d265Sagc# 3. Neither the name of the University nor the names of its contributors
1961f28255Scgd#    may be used to endorse or promote products derived from this software
2061f28255Scgd#    without specific prior written permission.
2161f28255Scgd#
2261f28255Scgd# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2361f28255Scgd# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2461f28255Scgd# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2561f28255Scgd# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2661f28255Scgd# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2761f28255Scgd# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2861f28255Scgd# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2961f28255Scgd# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3061f28255Scgd# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3161f28255Scgd# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3261f28255Scgd# SUCH DAMAGE.
3361f28255Scgd#
3407bae7edSchristos#	@(#)builtins.def	8.4 (Berkeley) 5/4/95
3561f28255Scgd
3661f28255Scgd#
3761f28255Scgd# This file lists all the builtin commands.  The first column is the name
38c02b3bbdSchristos# of a C routine.
39c02b3bbdSchristos# The -j flag specifies that this command is to be excluded from systems
40c02b3bbdSchristos# without job control.
41b9723b82Skre# The -h flag (no history) specifies that this command is to be excluded
42b9723b82Skre# from systems based on the SMALL compile-time symbol.
43c02b3bbdSchristos# The -s flag specifies that this is a posix 'special builtin' command.
44c02b3bbdSchristos# The -u flag specifies that this is a posix 'standard utility'.
45c02b3bbdSchristos# The rest of the line specifies the command name or names used to run
46c02b3bbdSchristos# the command.
4761f28255Scgd
48b9723b82Skrebltincmd	-u command		# MUST be first
49b9723b82Skrealiascmd	-u alias
50c02b3bbdSchristosbgcmd -j	-u bg
51c02b3bbdSchristosbreakcmd	-s break -s continue
52c02b3bbdSchristoscdcmd		-u cd chdir
53c02b3bbdSchristosdotcmd		-s .
54a18d86b7Skreechocmd		-u echo
55c02b3bbdSchristosevalcmd		-s eval
56c02b3bbdSchristosexeccmd		-s exec
57c02b3bbdSchristosexitcmd		-s exit
5837ed7877Sjtcexpcmd		exp let
59c02b3bbdSchristosexportcmd	-s export -s readonly
60c02b3bbdSchristosfalsecmd	-u false
61b9723b82Skrefdflagscmd	fdflags
62c02b3bbdSchristosfgcmd -j	-u fg
63658a58d0Sdslfgcmd_percent -j	-u %
64c02b3bbdSchristosgetoptscmd	-u getopts
65a18d86b7Skrehashcmd		-u hash
66b9723b82Skrehistcmd -h	-u fc
67b9723b82Skreinputrc		inputrc
6861f28255Scgdjobidcmd	jobid
69c02b3bbdSchristosjobscmd		-u jobs
70b9723b82Skrekillcmd		-u kill		# mandated by posix for 'kill %job'
7161f28255Scgdlocalcmd	local
7266e60a49Sjoerg#ifndef TINY
73a18d86b7Skreprintfcmd	-u printf
7495a73796Schristos#endif
75c02b3bbdSchristospwdcmd		-u pwd
76c02b3bbdSchristosreadcmd		-u read
77c02b3bbdSchristosreturncmd	-s return
78c02b3bbdSchristossetcmd		-s set
7961f28255Scgdsetvarcmd	setvar
80c02b3bbdSchristosshiftcmd	-s shift
81727a664bSkre#ifndef SMALL
82727a664bSkrespecialvarcmd	specialvar
83*d1c86d36Skresuspendcmd -j	suspend
84727a664bSkre#endif
85b9723b82Skretestcmd		-u test -u [
86c02b3bbdSchristostimescmd	-s times
87c02b3bbdSchristostrapcmd		-s trap
88c02b3bbdSchristostruecmd		-s : -u true
89a18d86b7Skretypecmd		-u type
90b9723b82Skreulimitcmd	-u ulimit
91c02b3bbdSchristosumaskcmd	-u umask
92c02b3bbdSchristosunaliascmd	-u unalias
93c02b3bbdSchristosunsetcmd	-s unset
94c02b3bbdSchristoswaitcmd		-u wait
95cf788c31Ssebwordexpcmd	wordexp
96b9723b82Skre
97c02b3bbdSchristos#newgrp		-u newgrp	# optional command in posix
98a18d86b7Skre#exprcmd	-u expr		# not currently built in, but could be
99c02b3bbdSchristos
100ab36694aSkre#ifdef	DEBUG
101ab36694aSkredebugcmd	debug
102ab36694aSkre#endif
103