[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bashbug bug, tilde bug

From: Davis Herring
Subject: bashbug bug, tilde bug
Date: Tue, 17 Jun 2003 18:18:41 -0600 (MDT)

(I encountered the first trying to report the second.)

>From bashbug:
-DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='pc' -DSHELL
-DHAVE_CONFIG_H  -I/usr/lanl/include -I.  -I. -I./include -I./lib
-I/usr/lanl/packages/bash-2.05/include -I/usr/lanl/include"

On the Linux system I was using (Red Hat, kernel 2.4.18-3) with bash 
v2.05.0(1)-release (i686-pc-linux-gnu), the 'mktemp' utility that 
'bashbug' uses does not accept the '-t' option, which breaks many things 
later on.

The principal concern: I have (for csh compatibility) a function defined
in my .bashrc thus:

function setenv { export "$1"="$2"; }

I then find that a command such as

setenv PATH $PATH:~/bin

does not do tilde expansion, even though (eventually) the tilde was used
in an assignment.  I suppose it's valid to say that the tilde did not
appear in an assignment (because tilde expansion had already been done
when the function was executed), but if so the docs should state that such
expansion is not re-performed in functions' parameters.

For comparison, using

function setenv { export $1=$2; }

did not help (and would introduce its own problems, of course), whereas

function ftest { echo ~/bin; }


function ftest { echo $1; }

did the expansion as I would expect.

Davis Herring

Am I a butterfly dreaming I'm a man?  Or a bowling ball dreaming I'm a
plate of sashimi?  Never assume what you see and feel is real!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]