[comp.sys.amiga] 1.3 Shell Bug?

arp@pdp.cs.OHIOU.EDU (John Gordos) (11/02/88)

	I have an alias in S:Shell-Startup 

		alias cp copy

	and copy is resident.    Works great.  However, if I

		run cp BigTextFile PRT:

	I get

		[CLI 2]
		cp: Command not Found

	or something similar.   Is this a bug?   Shouldn't the
	Shell expand the alias before RUN does his thing?   It
	would be much more useful if I didn't need to remember 
	to not alias things that I want to run in the background.

	John
-- 
=======================					====================
John A. Gordos, III					cbatt!oucs!arp
SAMI/Burke							-or-
							oucs!crta!gordos

kvancamp@ardec.arpa (Ken Van Camp) (11/03/88)

John A. Gordos writes:

 >	Is this a bug?   Shouldn't the
 >	Shell expand the alias before RUN does his thing?

Consider this example:

  alias dir ls
  cp dir df1:

By your arguments, the 'cp' command would copy the file "ls" instead of the
"dir" file I wanted to copy.  The answer is, alias only works on the first
word of a command line, not on arguments that follow.

                            --Ken Van Camp 

jmdavis@ihlpm.ATT.COM (Davis) (11/04/88)

> 
>  Complaints of a shell/cli problem with alias's like
> 
> Alias cp copy
>
> run cp filea fileb
>

I don't have 1.3, but the problem here seems to be that RUN invokes
the non-shell CLI while the shell is what translates the cp. So
why not execute something like:

	run shell cp filea fileb
	
What gives?

-- 
----------------------------------------------------------------------------
			Mike Davis ..!att!ihlpm!jmdavis

char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}

mlelstv@faui44.informatik.uni-erlangen.de (Michael van Elst ) (11/07/88)

In article <5136@louie.udel.EDU> kvancamp@ardec.arpa (Ken Van Camp) writes:
>John A. Gordos writes:
> >	Shell expand the alias before RUN does his thing?
>Consider this example:
>  alias dir ls
>  cp dir df1:
>By your arguments, the 'cp' command would copy the file "ls" instead of the
>"dir" file I wanted to copy.

In my opinion the RUN command should use the shell aliases.
That is, RUN should start a shell/CLI whether the parent process
is a shell/CLI and the shell should pass its aliases to such a
subshell.

				Michael van Elst

E-mail: UUCP: ...uunet!unido!fauern!faui44!mlelstv