Re: Possible Feature Requests (unsource, exchange)

2009-07-08 Thread Greg Wooledge
> > # Usage: exchange varname1 varname2 > > exchange() { > >local tmp > >[[ $1 = *[^[:alnum:]_]* || $1 = [0-9]* ]] && > > { echo "Naughty naughty" >&2; return 1; } > >[[ $2 = *[^[:alnum:]_]* || $2 = [0-9]* ]] && > > { echo "Naughty naughty" >&2; return 1; } > >eval tmp=\$$

Re: Possible Feature Requests (unsource, exchange)

2009-07-08 Thread Christopher Roy Bratusek
Am Tue, 7 Jul 2009 14:37:20 -0400 schrieb Greg Wooledge : > On Tue, Jul 07, 2009 at 08:16:50PM +0200, Christopher Roy Bratusek > wrote: > > unsource: the opposite of source (while source is making functions > > publically available, unsource would remove them) > > You can "unset -f" a function.

Re: Possible Feature Requests (unsource, exchange)

2009-07-07 Thread Dave B
On Tuesday 07 July 2009, Christopher Roy Bratusek wrote: > Hi all, > > what I'm currently missing are the following two things (I'm not 100% > sure if they are not available): > > unsource: the opposite of source (while source is making functions > publically available, unsource would remove them)

Re: Possible Feature Requests (unsource, exchange)

2009-07-07 Thread Greg Wooledge
On Tue, Jul 07, 2009 at 08:16:50PM +0200, Christopher Roy Bratusek wrote: > unsource: the opposite of source (while source is making functions > publically available, unsource would remove them) You can "unset -f" a function. You could source a script-file that contains a bunch of "unset -f foo"

Possible Feature Requests (unsource, exchange)

2009-07-07 Thread Christopher Roy Bratusek
Hi all, what I'm currently missing are the following two things (I'm not 100% sure if they are not available): unsource: the opposite of source (while source is making functions publically available, unsource would remove them) exchange: exchanges the value of two variables (x=2 y=a; exchange x