Bug#504292: [checkbashisms] Please detect use of $'...' to expand escape sequences

2008-11-11 Thread Raphael Geissert
Adam D. Barratt wrote: [...] > > If someone comes up with a useful way of excluding the cases above then > I'll happily apply it but given the improvement over the previous > attempt at catching this particular bashism I'm quite happy to go with > the patch and see if anyone moans. :) As long as

Bug#504292: [checkbashisms] Please detect use of $'...' to expand escape sequences

2008-11-11 Thread Adam D. Barratt
On Tue, 2008-11-11 at 10:57 +0100, Filippo Giunchedi wrote: > On Sun, Nov 09, 2008 at 08:13:26PM +, Adam D. Barratt wrote: > > Looking at an earlier set of results, there are still a couple of false > > positives but that's 97% less than before and libtool is full of > > horrible shell: > > >

Bug#504292: [checkbashisms] Please detect use of $'...' to expand escape sequences

2008-11-11 Thread Filippo Giunchedi
On Sun, Nov 09, 2008 at 08:13:26PM +, Adam D. Barratt wrote: > Looking at an earlier set of results, there are still a couple of false > positives but that's 97% less than before and libtool is full of > horrible shell: > > libtool_1.5.26-4_i386.deb:possible bashism in ./usr/bin/libtool line 4

Bug#504292: [checkbashisms] Please detect use of $'...' to expand escape sequences

2008-11-09 Thread Adam D. Barratt
Hi, On Sun, 2008-11-09 at 12:25 +0100, Filippo Giunchedi wrote: > It seems like that the false positives are all generated by $ inside quotes, > so > it might be sufficient to check if preceding single quotes are odd or even. > > IOW here is a five minute hack: [...] > unless I'm missing somethi

Bug#504292: [checkbashisms] Please detect use of $'...' to expand escape sequences

2008-11-08 Thread Raphael Geissert
Adam D. Barratt wrote: > On Sat, 2008-11-08 at 14:41 +0100, Filippo Giunchedi wrote: >> Hi, >> >> On Sun, Nov 02, 2008 at 04:15:41PM +, Adam D. Barratt wrote: >> > We are aware of the $'' bashism - indeed checkbashisms contains a >> > commented-out check for it. The reason the check is disabl

Bug#504292: [checkbashisms] Please detect use of $'...' to expand escape sequences

2008-11-08 Thread Adam D. Barratt
On Sat, 2008-11-08 at 14:41 +0100, Filippo Giunchedi wrote: > Hi, > > On Sun, Nov 02, 2008 at 04:15:41PM +, Adam D. Barratt wrote: > > We are aware of the $'' bashism - indeed checkbashisms contains a > > commented-out check for it. The reason the check is disabled is that > > when it and a si

Bug#504292: [checkbashisms] Please detect use of $'...' to expand escape sequences

2008-11-08 Thread Filippo Giunchedi
Hi, On Sun, Nov 02, 2008 at 04:15:41PM +, Adam D. Barratt wrote: > severity 504292 wishlist > thanks > > Hi, > > On Sun, 2008-11-02 at 16:03 +0100, jre-phoenix wrote: > > https://wiki.ubuntu.com/DashAsBinSh: > > $'...' is a bashism to expand escape sequences; for example, $'\t' > > expands t

Bug#504292: [checkbashisms] Please detect use of $'...' to expand escape sequences

2008-11-02 Thread Adam D. Barratt
severity 504292 wishlist thanks Hi, On Sun, 2008-11-02 at 16:03 +0100, jre-phoenix wrote: > https://wiki.ubuntu.com/DashAsBinSh: > $'...' is a bashism to expand escape sequences; for example, $'\t' > expands to a horizontal tab. Use "$(printf '\t')" etc. instead. > > Indeed $'...' only works wit