[TxMt] Re: Bug resolved, Shell Script Plugin, TMPFILE creation
Martin Kühl
martin.kuehl at gmail.com
Tue Feb 22 19:07:16 UTC 2011
Hi Rob,
thanks for the report and fix. As it happens, it had already found its
way into the codebase. :-)
The current version of the bundle is available on GitHub[1]. The easiest
way to get it is either via the big Downloads button or with GetBundles.
Cheers,
Martin
[1]: https://github.com/textmate/shellscript.tmbundle
On Tue, Feb 22, 2011 at 19:55, <robertharder.alt at mac.com> wrote:
> BUG:
> When using the Shell Script plugin's tempfile creation expansion (temp[tab]), a dollar sign gets left out:
>
> temp[tab]
>
> becomes
>
> TMPFILE="(mktemp -t Convert_ClassOO_Metrics_To_Tabular)"
> trap "rm -f '$TMPFILE'" 0 # EXIT
> trap "rm -f '$TMPFILE'; exit 1" 2 # INT
> trap "rm -f '$TMPFILE'; exit 1" 1 15 # HUP TERM
>
> Note the missing dollar sign $ in the first line to make the parentheses executable.
>
>
> FIX:
> I added a backslash in the bundle before the dollar sign that's there and is getting dropped (or rather, interpreted as a variable probably):
>
> ${1:TMPFILE}="$(mktemp....
>
> becomes
>
> ${1:TMPFILE}="\$(mktemp....
>
> ${1:TMPFILE}="\$(mktemp -t ${2:`echo "${TM_FILENAME%.*}" | sed -e 's/[^a-zA-Z]/_/g' -e 's/^$/untitled/'`})"
> ${3:${4/(.+)/trap "/}${4:rm -f '\$${1/.*\s//}'}${4/(.+)/" 0 # EXIT
> /}${5/(.+)/trap "/}${5:rm -f '\$${1/.*\s//}'; exit 1}${5/(.+)/" 2 # INT
> /}${6/(.+)/trap "/}${6:rm -f '\$${1/.*\s//}'; exit 1}${6/(.+)/" 1 15 # HUP TERM
> /}}
>
> Not sure how to work that change into the codebase.
>
> -Rob
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
More information about the textmate
mailing list