mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Make 'source' a regular built-in
The 'source' alias is now converted into a regular built-in command so that 'unalias -a' does not remove it, and something like cmd=source; $cmd name args will now work. This is part of the project to replace default aliases that define essential commands by proper builtins that act identically (except you now get the actual command's name in any error/usage messages). src/cmd/ksh93/data/aliases.c: - Remove 'source' default alias. src/cmd/ksh93/data/builtins.c, src/cmd/ksh93/include/builtins.h: - Define 'source' regular builtin with extra parser ID "SYSSOURCE". Same definition as '.', minus the BLT_SPC flag indicating a special builtin. This preserves the behaviour of 'command .'. - Update sh_optdot[] to include info for 'source --man'. (Note that \f?\f expands to the current command name. This allows several commands to share a single --man page.) src/cmd/ksh93/sh/parse.c: - In the two places that SYSDOT is checked for, also check for SYSSOURCE, making sure the two commands are parsed identically. src/cmd/ksh93/sh.1: - Remove 'source' default alias. - Document 'source' regular builtin.
This commit is contained in:
parent
b7f48e8a10
commit
ef1621c18f
8 changed files with 38 additions and 21 deletions
|
@ -804,8 +804,6 @@ but can be unset or redefined:
|
|||
.TP
|
||||
.B "r=\(fmhist \-s\(fm"
|
||||
.TP
|
||||
.B "source=\(fmcommand \s+2.\s-2\(fm"
|
||||
.TP
|
||||
.B "stop=\(fmkill \-s \s-1STOP\s+1\(fm"
|
||||
.TP
|
||||
.B "suspend=\(fmkill \-s \s-1STOP\s+1 $$\(fm"
|
||||
|
@ -7125,6 +7123,11 @@ Suspends execution for the number of decimal seconds or fractions of a
|
|||
second given by
|
||||
.IR seconds .
|
||||
.TP
|
||||
\f3source\fP \f2name\^\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK
|
||||
Same as
|
||||
.BR \|.\^ ,
|
||||
except it is not treated as a special built-in command.
|
||||
.TP
|
||||
\f3times\fP
|
||||
Displays the accumulated user and system CPU times, one line with the times
|
||||
used by the shell and another with those used by all of the shell's child
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue