Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15108 > unrolled thread

Re: alias problem -- conflict found

Started byL A Walsh <bash@tlinx.org>
First post2019-07-09 20:24 -0700
Last post2019-07-09 20:24 -0700
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: alias problem -- conflict found L A Walsh <bash@tlinx.org> - 2019-07-09 20:24 -0700

#15108 — Re: alias problem -- conflict found

FromL A Walsh <bash@tlinx.org>
Date2019-07-09 20:24 -0700
SubjectRe: alias problem -- conflict found
Message-ID<mailman.772.1562729084.2688.bug-bash@gnu.org>
On 2019/07/09 06:21, Greg Wooledge wrote:
> On Mon, Jul 08, 2019 at 03:30:47PM -0700, L A Walsh wrote:
>   
>> alias my='declare ' Export='\-x '  Map='-A '   Int='-i '
>>     
> Because the dead horse is still equine-shaped, I will beat upon it some
> more: this is utterly horrible coding and you should stop doing it.
>   
----
    Why?  What makes clarity "horrible".  If someone didn't know shell's
way of assigning different attributes to 'declare', vs. most languages
having
different keywords or variable notations would be more familiar.

    I rarely use the forms above, with the exception of 'my', since
it's alot shorter to type 'my' than its expanded form.  The most common
ones for me are:

my, int, array and map.  

    All of them are shorter than their original forms and are easier
to type and read.  So what is so horrible about them that it
should require longer repetitive strings that are not words?

    I made a mistake in developing an older program and didn't use
-u on the front of it.  It did just like you said -- it allowed a program
with an undefined variable in it to run in cases where it would have given
the right answer in many or most cases.  However, due to a lack of testing,
the cases that failed due to that undefined variable were not detected
by me
until recently. 

    The '-u' didn't hide something unimportant -- it hid a symptom of an
error that remained hidden for years. 

> I strongly disagree with your decision to do this, but whatever bug you're
> seeing, I'm not seeing it.  Not in bash 5.0 or 4.4, anyway, which are
> the only two versions I tried.
>   
It was due to conflict with a different '-x' alias for chmod'ing that is not
used in scripting, but in interactive use.


[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web