Package: highlight Version: 2.16-1 Severity: normal Tags: upstream patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
As is, the shebang recognition code matches the shebang against the entire first line of the file. This has the undesired effect that shebangs which contain switches after the executable (like for example: #!/usr/bin/awk -f) do not get recognised. Also executable variants (like for example python2.6, python3, etc.) do not get recognised, at least by the default-shipped regexes. For some languages (like awk, make) the presence of switches are mandatory in a shebang. For others are common. And in all cases, this is a departure from the commonly expected behaviour when a "^<some text>" regex is seen, which is to match at the start of the line. The attached patch makes shebangs match at the start of the string. Because the package format is quilt, I attach the contents of debian/patches instead of a diff (file: patch1.tar.bz2); this makes it IMHO easier to pass the patch upstream. I can also supply a diff if requested. The report also applies to the 3.7 series of the package (same code there). I thus attach the patch modified to apply to the collab-maint git repository (file: 0001-Make-shebang-regexes-match-at-the-start-of-the-line.patch.tar.bz2) with git-apply. While the later is at 3.5, I have checked the 3.7 tarball and the related code is the same; thus the git patch should apply without changes. regards George Zarkadas - -- System Information: Debian Release: 6.0.4 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable'), (450, 'testing-proposed-updates'), (450, 'testing'), (400, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores) Locale: LANG=el_GR.utf8, LC_CTYPE=el_GR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages highlight depends on: ii highlight-common 2.16-1 source code to formatted text conv ii libc6 2.11.3-2 Embedded GNU C Library: Shared lib ii libgcc1 1:4.4.5-8 GCC support library ii libstdc++6 4.4.5-8 The GNU Standard C++ Library v3 highlight recommends no packages. highlight suggests no packages. - -- no debconf information -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBAgAGBQJPNNNqAAoJEJWXIVmJ5BwWdxkH/2vmoVOPp5/6tW/wur7P4E+t 4VKPajU5LfMoBb0j39QJWoUclMTFnUHS6mVdalV77yFj9MFSWViijaH1Fon128Du B6bOy4VABb7kdiSGgx8TLvGq1M9AuC95pR+kjod5GGeBK285pOJJm8CNCZaPOdPb 41AwB5RB/KXSCVt5Sys8fd2+VrC/jj2UVHHBJDnb1jmcG8VJO/JtXgpWSuMsRl2Y lvi2dIwLXTCTnxHV0hpU2x7e+uiHbiV6iV0oUA9UX7368BTtIuZipPjMKNqhkIsq fBqqDx+StrGBg8K+7Gs2JGtPoEkAfkM+h3eBEmhB2x06BgVSvXOBYFtKiaB6Tb4= =Vt6y -----END PGP SIGNATURE-----
patch1.tar.bz2
Description: BZip2 compressed data
0001-Make-shebang-regexes-match-at-the-start-of-the-line.patch.tar.bz2
Description: BZip2 compressed data