Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-15 Thread Aaron Griffin
On Sat, Feb 13, 2010 at 2:12 PM, Evangelos Foutras wrote: > On 13/02/2010 08:57 μμ, Thomas Bächler wrote: >> >> Never use `...`, always $(...), always use the braces for variable names >> and always quote paths that contain variables. > > I do not agree with your view that braces should always be

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-14 Thread Ray Rashif
On 14 February 2010 04:19, Dieter Plaetinck wrote: > On Sat, 13 Feb 2010 16:10:08 -0600 > Muhammed Uluyol wrote: > >> On Sat, Feb 13, 2010 at 4:05 PM, Dieter Plaetinck >> wrote: >> > >> > what do you mean context? it only depends on whether the first >> > character after the variablename is a va

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Dieter Plaetinck
On Sat, 13 Feb 2010 16:10:08 -0600 Muhammed Uluyol wrote: > On Sat, Feb 13, 2010 at 4:05 PM, Dieter Plaetinck > wrote: > > > > what do you mean context? it only depends on whether the first > > character after the variablename is a valid character in a > > variablename or not.  if it's valid, us

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Muhammed Uluyol
On Sat, Feb 13, 2010 at 4:05 PM, Dieter Plaetinck wrote: > > what do you mean context? it only depends on whether the first > character after the variablename is a valid character in a variablename > or not.  if it's valid, use braces. if it isn't, no need for braces. Arrays can't be used with $a

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Thomas Bächler
Am 13.02.2010 22:13, schrieb Dieter Plaetinck: >> If you use braces only when necessary, it will not be consistent - you >> have braces sometimes and other times you don't. I thought coding >> style was about consistency. >> > > you can apply "only when needed" consistently. This is very unintuit

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Evangelos Foutras
On 13/02/2010 11:11 μμ, Thomas Bächler wrote: Am 13.02.2010 21:57, schrieb Dieter Plaetinck: For example, in a PKGBUILD I would write ${pkgname}_$pkgver, because _ can be part of a variable name, but I'd much rather prefer to use $pkgname-$pkgver, since hyphens are not allowed in variable names.

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Dieter Plaetinck
On Sat, 13 Feb 2010 22:11:01 +0100 Thomas Bächler wrote: > Am 13.02.2010 21:57, schrieb Dieter Plaetinck: > >>> For example, in a PKGBUILD I would write ${pkgname}_$pkgver, > >>> because _ can be part of a variable name, but I'd much rather > >>> prefer to use $pkgname-$pkgver, since hyphens are

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Thomas Bächler
Am 13.02.2010 21:57, schrieb Dieter Plaetinck: >>> For example, in a PKGBUILD I would write ${pkgname}_$pkgver, >>> because _ can be part of a variable name, but I'd much rather >>> prefer to use $pkgname-$pkgver, since hyphens are not allowed in >>> variable names. >>> >>> Less typing, less ugline

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Dieter Plaetinck
On Sat, 13 Feb 2010 15:16:01 -0500 Daenyth Blank wrote: > On Sat, Feb 13, 2010 at 15:12, Evangelos Foutras > wrote: > > For example, in a PKGBUILD I would write ${pkgname}_$pkgver, > > because _ can be part of a variable name, but I'd much rather > > prefer to use $pkgname-$pkgver, since hyphens

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Daenyth Blank
On Sat, Feb 13, 2010 at 15:12, Evangelos Foutras wrote: > For example, in a PKGBUILD I would write ${pkgname}_$pkgver, because _ can > be part of a variable name, but I'd much rather prefer to use > $pkgname-$pkgver, since hyphens are not allowed in variable names. > > Less typing, less ugliness.

Re: [arch-general] [arch-dev-public] Let's agree on a common coding style

2010-02-13 Thread Evangelos Foutras
On 13/02/2010 08:57 μμ, Thomas Bächler wrote: Never use `...`, always $(...), always use the braces for variable names and always quote paths that contain variables. I do not agree with your view that braces should always be used around variable names. While I would like to read any justificat