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

2014-10-11 Thread Barrie Stott
On 10 Oct 2014, at 23:45, Greg Earle wrote: On Oct 10, 2014, at 16:06 PM, Barrie Stott zen146...@zen.co.uk wrote: On 10 Oct 2014, at 15:27, Brandon Allbery wrote: That said, 10.6 being unsupported by Apple, it is possible that your best bet is to copy /bin/bash to /bin/bash.apple and

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

2014-10-11 Thread Ryan Schmidt
On Oct 11, 2014, at 7:29 AM, Barrie Stott wrote: I have no objection at all to rebuilding Apple's /bin/bash and /bin/sh when all I have to do is run the given script. However, Greg, do I need to do it? I already have shellshock-proof versions of bash 4.3.27. Is there something special

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

2014-10-11 Thread Barrie Stott
On 11 Oct 2014, at 13:35, Ryan Schmidt wrote: On Oct 11, 2014, at 7:29 AM, Barrie Stott wrote: I have no objection at all to rebuilding Apple's /bin/bash and /bin/sh when all I have to do is run the given script. However, Greg, do I need to do it? I already have shellshock-proof versions

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

2014-10-11 Thread Brandon Allbery
On Sat, Oct 11, 2014 at 8:35 AM, Ryan Schmidt ryandes...@macports.org wrote: It's the version of bash the scripts that came with your operating system were tested with. It's possible there are backwards-incompatible changes in bash 4. There are definitely backwards incompatible changes; most

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

2014-10-10 Thread Barrie Stott
On 9 Oct 2014, at 23:27, Jeremy Lavergne wrote: Off the top of my head: * Rosetta (for PPC) * Apple Mail in Mavericks cannot do any searching without spotlight (among other bugs) * Mavericks Messages keeps records of every chat you’ve had, the option to explicitly “close” can cause

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

2014-10-10 Thread Mathias Laurin
Wouldn't the stopping of function export from MacPorts' bash be a big restriction on bash use. For example, I want to be able to type mvim, with or without parameters, to open a MacVim window. At present, I get the error: /bin/sh: line 8: `BASH_FUNC_usenosql%%': not a valid identifier. Would

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

2014-10-10 Thread Brandon Allbery
On Fri, Oct 10, 2014 at 6:13 AM, Barrie Stott zen146...@zen.co.uk wrote: Wouldn't the stopping of function export from MacPorts' bash be a big restriction on bash use. For example, I want to be able to type mvim, with or without parameters, to open a MacVim window. At present, I get the

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

2014-10-10 Thread Brandon Allbery
On Fri, Oct 10, 2014 at 7:19 AM, Mathias Laurin mathias.lau...@gmail.com wrote: #!/usr/bin/env -i /bin/sh I expect MacVim would behave very poorly without $HOME and possibly $SHELL set. Probably others as well. -- brandon s allbery kf8nh sine nomine associates

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

2014-10-10 Thread Barrie Stott
On 10 Oct 2014, at 12:19, Mathias Laurin wrote: Wouldn't the stopping of function export from MacPorts' bash be a big restriction on bash use. For example, I want to be able to type mvim, with or without parameters, to open a MacVim window. At present, I get the error: /bin/sh: line 8:

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

2014-10-10 Thread Barrie Stott
On 10 Oct 2014, at 13:48, Brandon Allbery wrote: On Fri, Oct 10, 2014 at 6:13 AM, Barrie Stott zen146...@zen.co.uk wrote: Wouldn't the stopping of function export from MacPorts' bash be a big restriction on bash use. For example, I want to be able to type mvim, with or without parameters,

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

2014-10-10 Thread Brandon Allbery
On Fri, Oct 10, 2014 at 10:07 AM, Barrie Stott zen146...@zen.co.uk wrote: Where is this Debian/FreeBSD patch? What is it patching? Are there instructions for its use? https://svnweb.freebsd.org/ports/head/shells/bash/files/extrapatch-import-functions?revision=369467view=markup It's a patch to

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

2014-10-10 Thread Barrie Stott
On 10 Oct 2014, at 15:27, Brandon Allbery wrote: That said, 10.6 being unsupported by Apple, it is possible that your best bet is to copy /bin/bash to /bin/bash.apple and then copy MacPorts' bash to /bin/bash. (But beware, if you remove MacPorts in the future your /bin/bash will break;

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

2014-10-10 Thread Brandon Allbery
On Fri, Oct 10, 2014 at 11:06 AM, Barrie Stott zen146...@zen.co.uk wrote: I've done that and I've doe something similar with /bin/sh as well. Surprisingly, I found original /bin/bash and /bin/sh different. The new stuff is: -rwxr-xr-x 1 root wheel 1893232 10 Oct 15:43 /bin/bash -rwxr-xr-x

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

2014-10-10 Thread Greg Earle
On Oct 10, 2014, at 16:06 PM, Barrie Stott zen146...@zen.co.uk wrote: On 10 Oct 2014, at 15:27, Brandon Allbery wrote: That said, 10.6 being unsupported by Apple, it is possible that your best bet is to copy /bin/bash to /bin/bash.apple and then copy MacPorts' bash to /bin/bash. (But

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

2014-10-10 Thread Brandon Allbery
On Fri, Oct 10, 2014 at 6:45 PM, Greg Earle ea...@isolar.dyndns.org wrote: Personally I wouldn't replace Apple's bash/sh with MacPorts' versions. I did suggest building it himself first, with copying MacPorts' bash as a fallback. I even provided a caveat as to why it might not be a good idea.

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

2014-10-09 Thread Barrie Stott
This is the sequence of events that led to me getting the error in the Subject line. I had used MacVim on the previous day with no problem and had used mail and Skype today and the iMac was left switched on with several tabs open in the browser and files open in MacVim. Unrelated to the

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

2014-10-09 Thread Michael Crawford
GNU Emacs is bundled with Mac OS X, if you need an editor until you can fix whatever is wrong with Vim. If you don't know how to use Emacs, enter Control-H T after giving the command: $ emacs ... in Terminal to get the tutorial. I mostly use Vim too but there _are_ some tasks that are

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

2014-10-09 Thread Lawrence Velázquez
On Oct 9, 2014, at 12:25 PM, Barrie Stott zen146...@zen.co.uk wrote: On trying to get MacVim going I typed something like 'mvim file1 file' in a terminal and the error message in the Subject line appeared. Does MacVim start if you run it from Finder? If anyone can tell me what is wrong or

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

2014-10-09 Thread Brandon Allbery
On Thu, Oct 9, 2014 at 12:25 PM, Barrie Stott zen146...@zen.co.uk wrote: This is the sequence of events that led to me getting the error in the Subject line. Check your .bash_profile / .bashrc; you appear to be defining a function named ttr%%, which is an illegal function name. -- brandon s

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

2014-10-09 Thread Barrie Stott
On 9 Oct 2014, at 19:30, Brandon Allbery wrote: On Thu, Oct 9, 2014 at 12:25 PM, Barrie Stott zen146...@zen.co.uk wrote: This is the sequence of events that led to me getting the error in the Subject line. Check your .bash_profile / .bashrc; you appear to be defining a function named

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

2014-10-09 Thread Brandon Allbery
On Thu, Oct 9, 2014 at 4:06 PM, Barrie Stott zen146...@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). --

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

2014-10-09 Thread Dave Horsfall
On Thu, 9 Oct 2014, Michael Crawford wrote: Kids these days! Back when I was but a lad, when TECO broke down I took apart the fourteen-inch SMD drive with a screwdriver then edited my files with a needle ripped out of my Boy Scout compass. You had a Boy Scout compass? We had to use use

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

2014-10-09 Thread Michael Crawford
Try commenting off portions of your .bashrc by inserting # with Emacs to see if you can make the complaint go away. Alternatively, save a copy of your file as a backup, then just delete portions to see if you can eliminate the complaint. When the complaint goes away, try putting in just half of

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

2014-10-09 Thread Michael Crawford
On Thu, Oct 9, 2014 at 12:51 PM, Barrie Stott zen146...@zen.co.uk wrote: GNU Emacs is bundled with Mac OS X, if you need an editor until you can fix whatever is wrong with Vim. Thank you for that. I was wondering how I could proceed if no one had met my error message before. Kids these

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

2014-10-09 Thread Barrie Stott
On 9 Oct 2014, at 19:08, Lawrence Velázquez wrote: On Oct 9, 2014, at 12:25 PM, Barrie Stott zen146...@zen.co.uk wrote: On trying to get MacVim going I typed something like 'mvim file1 file' in a terminal and the error message in the Subject line appeared. Does MacVim start if you run

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

2014-10-09 Thread Brandon Allbery
On Thu, Oct 9, 2014 at 4:17 PM, Barrie Stott zen146...@zen.co.uk wrote: If anyone can tell me what is wrong or suggest how I can proceed I'd be pleased to hear about it. The `mvim` script doesn't contain the string BASH_FUNC. It won't; that's the hackaround for the Shellshock exported

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

2014-10-09 Thread Brandon Allbery
On Thu, Oct 9, 2014 at 4:46 PM, Barrie Stott zen146...@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 zen146...@zen.co.uk wrote: function ttr() You should use wither ttr() or function ttr, not both. It's replacing () with

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

2014-10-09 Thread Lawrence Velázquez
On Oct 9, 2014, at 4:46 PM, Barrie Stott zen146...@zen.co.uk wrote: Also all the old versions of the functions have been present for well over 6 months so I reckon something else is involved. I expect you installed OS X bash Update 1.0, which changed (read: fixed) the way bash exports

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

2014-10-09 Thread Barrie Stott
On 9 Oct 2014, at 22:07, Lawrence Velázquez wrote: On Oct 9, 2014, at 4:46 PM, Barrie Stott zen146...@zen.co.uk wrote: Also all the old versions of the functions have been present for well over 6 months so I reckon something else is involved. I expect you installed OS X bash Update 1.0,

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

2014-10-09 Thread Barrie Stott
On 9 Oct 2014, at 21:51, Brandon Allbery wrote: On Thu, Oct 9, 2014 at 4:46 PM, Barrie Stott zen146...@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 zen146...@zen.co.uk wrote: function ttr() You should use wither ttr() or

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

2014-10-09 Thread Dave Horsfall
On Thu, 9 Oct 2014, Barrie Stott wrote: http://support.apple.com/kb/HT6495 No I didn't. I'm running Snow Leopard v10.6.8 and, according the document referenced above, it doesn't appear to be for that version of OS X. Is there any good reason to stay with Snow Leopard, when the upgrade

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

2014-10-09 Thread Jeremy Lavergne
Off the top of my head: * Rosetta (for PPC) * Apple Mail in Mavericks cannot do any searching without spotlight (among other bugs) * Mavericks Messages keeps records of every chat you’ve had, the option to explicitly “close” can cause deletion when set but previously iChat didn’t try to

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

2014-10-09 Thread Brandon Allbery
On Thu, Oct 9, 2014 at 5:41 PM, Barrie Stott zen146...@zen.co.uk wrote: 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 ;