[code] [textadept] Failed language detection when shebang contains `env`?

From: William Woodruff <william.att.tuffbizz.com>
Date: Tue, 12 May 2015 21:46:20 -0400

Hi all,

I've just started using textadept, and I've noticed that it fails to
detect some scripting languages
when the shebang line uses `env` instead of a flat path. For example:

#!/usr/bin/env bash

does not trigger bash's syntax highlighting, while:

#!/bin/bash

does.

I think I've traced this down to modules/textadept/file_types.lua,
line 33, which uses this regex:

'^#!.+/bash'

among others to determine language via shebang. If I'm reading this
correctly, the problem is with
the '/' right before bash, and can be corrected simply by removing it.

I don't have any formal experience with Lua and less than 3 hours of
experience with textadept,
so I would greatly appreciate a confirmation of this behavior on
anybody else's system before
I submit a patch.

Best regards,
William Woodruff

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 12 May 2015 - 21:46:20 EDT

This archive was generated by hypermail 2.2.0 : Wed 13 May 2015 - 06:29:04 EDT