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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sat, 13 Feb 2010 15:16:01 -0500
Daenyth Blank <daenyth+arch@xxxxxxxxx> wrote:

> On Sat, Feb 13, 2010 at 15:12, Evangelos Foutras
> <foutrelis@xxxxxxxxx> 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. :)
> >
> 
> This is the way I've always done it and it's much nicer to read. Same
> for quoting, use only when needed.

+1 for braces around vars only when needed.

for quoting I'm not so sure. I personally also only quote when I know
it's needed, but when your code is shared with a lot of people it can
be useful that other people immediately know that stuff is safe
(without them having to know all possible values a certain
variable can have)


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux