From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <07c301c3aae0$5a0e7900$b9844051@insultant.net> From: "boyd, rounin" To: <9fans@cse.psu.edu> References: Subject: Re: [9fans] v8 shell MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Date: Fri, 14 Nov 2003 19:51:45 +0100 Topicbox-Message-UUID: 899a6fce-eacc-11e9-9e20-41e7f4b1d025 > $ ls() { > builtin ls "$@" | cat > } > $ ls > -bash: builtin: ls: not a shell builtin > $ > > they don't seem to have a clue. does it? well, i shouldn't really be suprised. hang on, i just re-read that and that would indicated the ls(1) is actually coded into bash. even for bash, that's a bit of a stretch [diabolical liberty]. builtin is trivial. using it with cd was the usual hack, rather than all those dreadful PS1 string printf style formatting things. builtin is a mix of quoting / eval / shift; you find builtin and then throw it away and the parse/execution tree is the stuff that follows.