Thanks for the detailed guide to reproduce Martin. I was able to find and disable the bundle item easily with those steps.

The reason for disabling this occurs mostly when working on forked repositories (I've mainly found this with TM Bundles, actually), I've noticed that files have the shebang at the top, yet they're not executable. Having it change on autosave causes headaches, not only because the file changes in ways which are unexpected, but also because it's unnecessary in the scope of the project (because those files never needed to be executable in the first place).

Anyway, thanks for the fix!
Siame

On 26 October 2016 at 17:56, Martin Kühl <martin.kuehl@gmail.com> wrote:
Hi,

On 26 October 2016 at 18:08, Siame Rafiq <siame@rolepoint.com> wrote:
> I've noticed that any file that has a shebang at the top (#! /path/to/exec),
> is automatically set to executable when saved. Is there any way to turn off
> this functionality?

You can use “Bundles»Select Bundle Item…” (⌃⌘T),
then in that dialog’s Gear menu select “Search All Scopes” (⌘3) (just
to be safe)
and search for “exec”, say (since the command makes files executable,
it’s a good guess that it’s name would indicate this)
to find the command “Make Script Executable” from the Source bundle.
(There’s a command with the same name in the Shell Script bundle, but
that’s not the one you’re after.)
Then hit “Edit” to open it in the bundle editor, where you can disable
or modify it to your liking.

Alternatively, since the command is run on save,
you can search for it by its semantic class.
Choose “Semantic Class” from the Gear menu,
and search for “save” to find it.

If you don’t mind me asking, why would you like to disable this functionality?
I don’t quite see why one would want to have shebang lines
in files that aren’t supposed to be executable…

Cheers,
Martin

_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate