delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/02/13/16:36:58

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Wed, 13 Feb 2002 16:07:10 -0500
MIME-Version: 1.0
Subject: Re: Some small bash issues
Message-ID: <3C6A8F2E.19324.1C1A9C@localhost>
In-reply-to: <000001c1b4c5$2e25a2e0$e4f8e0d5@zastaixp>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

>  - readline not quite OK (Del, Ctl-Left, Ctl-Right, ... don't work)

set TERM=djgpp
should do it.

>  - some issues with envvars:
> 
>       foo=bar echo $foo
> 
>    is supposed to print "bar", but doesn't.

I seem to remember answering this once before. The answer is that this is the 
way Bash works:

Simple Command Expansion
------------------------

   When a simple command is executed, the shell performs the following
expansions, assignments, and redirections, from left to right.

  1. The words that the parser has marked as variable assignments (those
     preceding the command name) and redirections are saved for later
     processing.


In other words, "foo=bar" isn't peformed until after the command is executed.

Mark


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019