[comp.unix.wizards] Bug or feature? You be the judge.

ado@elsie.UUCP (Arthur David Olson) (05/02/88)

At least with the version we use, the ksh history mechanism is sensitive
to leading space in commands:
	Script started on Sun May  1 19:58:14 1988
	$ echo alpha
	alpha
	$  echo beta
	beta
	$ r echo
	echo alpha
	alpha
	$ exit

	script done on Sun May  1 19:58:30 1988
Some will say this is a bug; others will say that it provides a convenient
way to "disguise" a command for historical purposes.  You be the judge.
-- 
	ado@ncifcrf.gov			ADO is a trademark of Ampex.

lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) (05/02/88)

In article <8048@elsie.UUCP> ado@elsie.UUCP (Arthur David Olson) writes:
>At least with the version we use, the ksh history mechanism is sensitive
>to leading space in commands:

>Some will say this is a bug; others will say that it provides a convenient
>way to "disguise" a command for historical purposes.  You be the judge.
>-- 
>	ado@ncifcrf.gov			ADO is a trademark of Ampex.

What's the point of this article?  You be the judge :-)

You can give a quoted string to r, eg:

	$ echo alphabet
	alphabet
	$  echo betabet
	betabet
	$ r ' echo'
	betabet
	$

This also works for the redirection operators:

	$ > ls.out ls	# same as ls > ls.out
	$ r >
	sh: syntax error: `newline or ;' unexpected
	$ r \>
	> ls.out ls
	$

-- 
Larry Cipriani, AT&T Network Systems and Ohio State University
Domain: lvc@tut.cis.ohio-state.edu
Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (weird but right)