From abc@froggy.anchorage.ptialaska.net  Wed Oct 14 16:24:51 1998
Received: from froggy.anchorage.ptialaska.net (froggy.anchorage.ptialaska.net [208.151.119.238])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA17260
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 14 Oct 1998 16:24:45 -0700 (PDT)
          (envelope-from abc@froggy.anchorage.ptialaska.net)
Received: (from abc@localhost)
	by froggy.anchorage.ptialaska.net (8.8.8/8.8.8) id OAA11388;
	Wed, 14 Oct 1998 14:02:04 GMT
	(envelope-from abc)
Message-Id: <199810141402.OAA11388@froggy.anchorage.ptialaska.net>
Date: Wed, 14 Oct 1998 14:02:04 GMT
From: groggy@iname.com
Reply-To: groggy@iname.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: lost alias due to exports in .profile
X-Send-Pr-Version: 3.2

>Number:         8319
>Category:       bin
>Synopsis:       lost alias due to exports in .profile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 14 16:30:01 PDT 1998
>Closed-Date:    Thu Oct 15 08:17:03 PDT 1998
>Last-Modified:  Fri Oct 16 07:30:00 PDT 1998
>Originator:     Steve Howe
>Release:        FreeBSD 2.2.7-RELEASE i386
>Organization:
none
>Environment:
sh shell

	sh shell (login time)

>Description:

	if a ".profile" contains "export VAR=value" lines,
        aliases are lost from the file in the ENV variable
        when logging into a 2.2.7 system.

>How-To-Repeat:

	IN A USER DIRECTORY:

        (the alias "a" will not function unless
        export TERM=cons25 -> TERM=cons25; export TERM)

        #!/bin/sh
        echo ~/.profile
        export TERM=cons25
        ENV=~/.shinit; export ENV
        echo

        #!/bin/sh
        #echo ~/.shinit
        a="alias|sort|more"
        q="cd /home/user; ls"

>Fix:
	
	unknown

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Thu Oct 15 08:17:03 PDT 1998 
State-Changed-Why:  
Pilot error. 

From: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= )
To: groggy@iname.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/8319: lost alias due to exports in .profile
Date: 15 Oct 1998 17:16:37 +0200

 groggy@iname.com writes:
 >         #!/bin/sh
 >         #echo ~/.shinit
 >         a="alias|sort|more"
 >         q="cd /home/user; ls"
 
 That's not going to work. Use:
 
 alias a='alias|sort|more'
 alias q='cd $HOME; ls'
 
 DES
 -- 
 Dag-Erling Smrgrav - dag-erli@ifi.uio.no

From: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= )
To: freebsd-gnats-submit@freebsd.org
Cc:  Subject: [Steve Howe <groggy@iname.com>] Re: bin/8319: lost alias due to exports in .profile
Date: 16 Oct 1998 16:26:43 +0200

 ------- Start of forwarded message -------
 Date: Fri, 16 Oct 1998 05:25:47 -0800 (AKDT)
 From: Steve Howe <groggy@iname.com>
 To: "Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?=" <dag-erli@ifi.uio.no>
 Subject: Re: bin/8319: lost alias due to exports in .profile
 Message-ID: <Pine.BSF.3.96.981016051817.1611A-100000@abc.xyz.net>
 
 On 16 Oct 1998, Dag-Erling C. [iso-8859-1] Smrgrav wrote:
 
 > If you have a more complete description than the one in the PR, go
 > ahead. I still maintain that the only problem here is your
 > interpretation ov the sh(1) man page.
 
 
 THIS IS A USER ~/.profile
 
 #!/bin/sh
 echo ~/.profile
 export TERM=cons25
 ENV=~/.shinit; export ENV
 echo
 
 THIS IS A USER ~/.shinit
 
 #!/bin/sh
 #echo ~/.shinit
 set -E
 alias     a='alias    |   sort   |   more'
 alias     q='cd $HOME;                 ls'
 
 UNDER THESE CONDITIONS, ALIAS "a" RESPONDS
 
 a: not found
 
 IF I MODIFY ~/.profile AS FOLLOWS:
 
 #!/bin/sh
 echo ~/.profile
 TERM=cons25;  export TERM
 ENV=~/.shinit; export ENV
 echo
 
 ALL WORKS AS EXPECTED.
 
 the 1st alias in ~/.shinit is removed
 whenever a "export VAR=value" command
 is used in ~./profile.
 
 however, if one uses "VAR=value; export VAR"
 commands in ~/.profile, all aliases in
 ~/.shinit work as expected.
 
 thank you,
 
 regards.
 
 ------- End of forwarded message -------
>Unformatted:
