[TxMt] export property list keys as BASH variables
Hans-Joerg Bibiko
bibiko at eva.mpg.de
Mon Nov 20 12:59:50 UTC 2006
On 20 Nov 2006, at 11:58, Allan Odgaard wrote:
> On 20. Nov 2006, at 11:10, Hans-Joerg Bibiko wrote:
>
>> to avoid the ! error you can use '' instead of "" but then it
>> complicates a bit the BASH function
> ...
> Why you can’t escape it in a double-quoted string is weird, one
> solution though would be to escape it by first closing the string,
> i.e.: echo "foo"\!" bar".
>
> As for arrays and sub-shells, I think you mean sub-processes, i.e.
> the array cannot be exported to new processes you launch from the
> shell (since arrays are bash-only), but would that matter? If you
> start a new process, chances are that process is a scripting
> language that can parse property lists.
>
>
Well, that's right. I guess each script language can parse plist by
itself, but I find it quite convient to export also an BASH array and
you will simplify your script, e.g. if you want to write an bash
inline script command à la perl -e ''.
Nevertheless I will add an option to exportpl to export an array as a
string which will be exported.
On the other hand I just check for escaping some characters for bash.
The new version will come soon.
Best,
Hans
More information about the textmate
mailing list