rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* opposite of builtin is builtin
@ 1991-07-01 22:05 DaviD W. Sanderson
  0 siblings, 0 replies; only message in thread
From: DaviD W. Sanderson @ 1991-07-01 22:05 UTC (permalink / raw)
  To: rc

Mark-Jason Dominus <mjd@saul.cis.upenn.edu> wrote:
> There is a `builtin' command,
...
> It might be nice to have a similar functionality for non-builtin
> functions,

Byron has suggested in mail to me that he will change "builtin" to
go through the normal process of executing the given command, except
that the normal search for a function of that name will be supressed.
This implies a path search if the given command is not a builtin.

Currently I have this in my .rcrc file to provide a front end function
for the 'ls' command which adds options I like if the output is to the
tty:
	eval (					\
	fn ls '{'				\
		'test -t 1 && * = (-FCb $*);'	\
		`{whatis ls} '$*'		\
	'}'					\
	)

If Byron changes builtin as he suggested, I will be able to use this
much more aesthetic function instead:

	fn ls {
		test -t 1 && * = (-FCb $*)
		builtin ls $*
	}

DaviD W. Sanderson (dws@cs.wisc.edu)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1991-07-01 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-07-01 22:05 opposite of builtin is builtin DaviD W. Sanderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).