[gnu.bash.bug] functions and builtins

drazen@VLSI.CALTECH.EDU (Drazen Borkovic) (12/07/89)

I know that finding functions before builtins is probably more flexible,
but sh (on SunOS 3.5) (and ksh) find the builtin first.

Also, here are some things that would be nice to have.
I know it is easy to talk about additions, but some of them shouldn't
be too hard.

1. noclobber ( >| or >! would override)
2. variable PPID  (parent process id) - shouldn't be too hard
3. variable RANDOM (initialize the seed when assigning to it)
   shouldn't be too hard
4. logout if idle time too long - shouldn't be too hard
5. [^characters] in file name generation (doesn't match characters)
6. arithmetic (like ksh)
7. ulimit Hard or Soft (Soft if you want to have a limit temporarily)
   shouldn't be too hard
8. when reporting errors when sourcing (.), line numbers would be nice

Hope this helps.

Drazen Borkovic   drazen@vlsi.caltech.edu

bfox@sbphy.ai.mit.edu (Brian Fox) (12/08/89)

   Date: Thu, 7 Dec 89 02:15:56 PST
   From: drazen@vlsi.caltech.edu (Drazen Borkovic)

   I know that finding functions before builtins is probably more flexible,
   but sh (on SunOS 3.5) (and ksh) find the builtin first.

I can't imagine why anyone would want to do this.  This means that
defining a function may not change any behaviours depending on the name
of the function, and what builtins exist in the shell.  Bleah!

POSIX shells will do it the way that Bash does:

	if COMMAND is quoted then lookup through PATH.

	if COMMAND is a function then do the function,
	else if COMMAND is a builtin then do the builtin,
	else lookup COMMAND through PATH.

Brian