[Top][All Lists]

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

Re: alias problem -- conflict found

From: L A Walsh
Subject: Re: alias problem -- conflict found
Date: Tue, 09 Jul 2019 20:24:30 -0700
User-agent: Thunderbird

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
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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]