🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #816

functions and builtins

#816
From: Brian Fox
Date: Thu, 07 Dec 1989 21:07
20 lines
1158 bytes
   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
Technical Details
Message-ID: <8912072107.AA15825@sbphy.Ucsb.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!sbphy.ai.mit.edu!bfox
References: <8912071015.AA19603@vlsi.caltech.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!sbphy.ai.mit.edu!bfox
From: bfox@sbphy.ai.mit.edu (Brian Fox)
Newsgroups: gnu.bash.bug
Subject: functions and builtins
Message-ID: <8912072107.AA15825@sbphy.Ucsb.EDU>
Date: 7 Dec 89 21:07:57 GMT
References: <8912071015.AA19603@vlsi.caltech.edu>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: bfox@aurel.cns.caltech.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 20