Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: konsolebox Newsgroups: gnu.bash.bug Subject: Re: Preventing Bash Variable Confusion Date: Thu, 30 Jan 2020 16:19:01 +0800 Lines: 26 Approved: bug-bash@gnu.org Message-ID: References: <20200128210225.GC12574@localhost4.local> <20200130064018.GA23692@localhost4.local> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1580372436 11484 209.51.188.17 (30 Jan 2020 08:20:36 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: Roger Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V68feeeHiGaa6ryCeK8404Xlu3dZCNdFxUWSLASOCVY=; b=aJefUh4pG7YV3netYTFg6GGmfgvBfrYrvE4tAcy1h4/A6ky47hDW+JNRsczjlTj81/ pV2gE7m5k3SlfDis3hHWa8IPihgyxex14Ie6IAjjv1stLIH3TsxoMmZOGILXL/VMpGPr n4BNuobJpz6jak24QoWqAlXIpQiEhNOhDxpNIsSDXKt/bmz/cc9BA30Haq0UTDDV8vho SLRYe6XXVqqch2NA+yvLU/E0G+6cIBUyeW75+8Rf/po8YxTlbGKcddsCTNa6riPYLJL7 D+MbQMIpB+QwecSJCFZbiO8BrIknjhh9Ue4VEzsT/UiXXggTQTkEZEDZW3KM3PQ9H5nW 3HZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V68feeeHiGaa6ryCeK8404Xlu3dZCNdFxUWSLASOCVY=; b=UxYqQkWRLU4za+6ppVl9lrGHX2NK6E6FETT39tUegSjohE4qpfTym3/7VpJIKSJ+g0 vk9cmwtsK47mELjZWDapYORha5ug+YJfogY2vrlAqVaS/jcVh750FCqG6uXWYk77ihdq 2KKTYwulWwPtDp2LLu/9BVa8XbhBiJyWgRiuSK7IrUlNZfskE4Asxz9GAhDWEFNiMOfL wNzmp/bQzFxtYJ/QZErcUw7mFTutLZMwkKpVs4fDW6aj8tUMIB70qdehci4vgqDyzIJj CT5xcVVFSUuyrNl1zt1IKywZ4jXco/nqPmrvRClm3KtSSzdCuJTQ5q3Me0H5ft0ekSAi ofYQ== X-Gm-Message-State: APjAAAX5oKAfmASW4I1Fjt0XHUZizNWvXsr9S+nqywyC8Lr7zAcIMEXQ pJsGH241P/ImPljDlVuDb57XU4dpe+Zo6dQWs3w= X-Google-Smtp-Source: APXvYqwoNnmYz4qhLnFmUcp7qa276lUEQMo14dtaOMBlOLnjNZTkdQmRN2G2mVwfx5nChM2qiR2uvv/AKyw+oNc6164= X-Received: by 2002:a02:cc75:: with SMTP id j21mr2787529jaq.113.1580372431673; Thu, 30 Jan 2020 00:20:31 -0800 (PST) In-Reply-To: <20200130064018.GA23692@localhost4.local> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d36 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <20200128210225.GC12574@localhost4.local> <20200130064018.GA23692@localhost4.local> Xref: csiph.com gnu.bash.bug:15853 On Thu, Jan 30, 2020 at 2:40 PM Roger wrote: > 1) Using an underslash on all capitol variable names just looks ugly in my > opinion. If you mean adding an underscore prefix I agree. > 2) Prefixing variable names with the name of the script (or other lengthy > prefix) requires more characters I could be using for describing my variable or > function. (If I were writing unreadable code, I probably would not mind.) Really just useful if you're writing in multiple scripts. > I've decided to comply with Google's Style guidelines, even though they do not > pay me a paycheck, but they do give me lots of free stuff. Shrugs, besides, > the more my Bash scripting looks like C, the easier it is to read. > > The can push me away from defining my variables in all capitol letters. They > can even push me to code in C and Assembly, but just don't push me to script in > Python. They still allow you to define constants in all-caps. The impact it makes is not so different with defining globals as such. Try Ruby. -- konsolebox