/bin/sh: line 2: `BASH_FUNC_ttr%%': not a valid identifier

Barrie Stott zen146410 at zen.co.uk
Thu Oct 9 14:41:53 PDT 2014


On 9 Oct 2014, at 21:51, Brandon Allbery wrote:

> On Thu, Oct 9, 2014 at 4:46 PM, Barrie Stott <zen146410 at zen.co.uk> wrote:
> On 9 Oct 2014, at 21:10, Brandon Allbery wrote:
> > On Thu, Oct 9, 2014 at 4:06 PM, Barrie Stott <zen146410 at zen.co.uk> wrote:
> > function ttr()
> >
> > You should use wither "ttr()" or "function ttr", not both. It's replacing () with %% and then tripping over it later (possibly it accepts it when defined for some reason, but it still knows it's illegal).
> >
> I've replaced functions like "function asdf() ..." by "function asdf ..." throughout, run ". ~/.bashrc" but typing "mvim" continues to give the error. Also all the old versions of the functions have been present for well over 6 months so I reckon something else is involved.
> 
> You would also need to log out and back in, since the point is these were generated by already running shells and are now in your environment. (type "env | grep BASH_FUNC"). 

I tried in sequence logging out, restarting and finally shutting down and powering up. With all of these, I used "env | grep BASH_FUNC" with the same result:

BASH_FUNC_ttr%%=() {  d="Jan 25: Feb 22: Mar 29: Apr 26: May 31: Jun 28: Sep 27: Oct 25: Dec 6";
BASH_FUNC_usenosql%%=() {  PS1="\[\](nosql):\W \$ \[\]";
BASH_FUNC_mymup2pdf%%=() {  mup-prog $@ > /tmp/x.ps;
BASH_FUNC_b12%%=() {  d=6;

Yet, for all of these, ~/.bashrc has
"function xxx {" instead of
"BASH_FUNC_xxx%%=() {"

I don't know if it's relevant but I'm running Snow Leopard: OS X 10.6.8. I have no idea how to get rid of this blight. I can swap to a previous bash version but, as you can probably guess, I'll clutch at anything going!

Barrie.


More information about the macports-users mailing list