Re: alias problem -- conflict found

2019-07-15 Thread Greg Wooledge
On Fri, Jul 12, 2019 at 07:22:25PM -0700, Eduardo Bustamante wrote: > Can we please STOP this thread? What is the point? Linda will never > change her mind. You all are just wasting time and electricity. > > (and spamming the mailing list with this non-sense). https://xkcd.com/386/

Re: alias problem -- conflict found

2019-07-12 Thread Eduardo Bustamante
Can we please STOP this thread? What is the point? Linda will never change her mind. You all are just wasting time and electricity. (and spamming the mailing list with this non-sense).

Re: alias problem -- conflict found

2019-07-12 Thread Robert Elz
Date:Fri, 12 Jul 2019 10:22:18 -0700 From:L A Walsh Message-ID: <5d28c1ca.3000...@tlinx.org> | They are both substitution mechanisms. No, they're not. The hash table is an optimisation which speeds the search for the pathname of a command, and that's all - every

Re: alias problem -- conflict found

2019-07-12 Thread Dennis Williamson
On Fri, Jul 12, 2019, 3:46 PM L A Walsh wrote: > On 2019/07/12 11:51, Eli Schwartz wrote: > > > find_cmds() { > for c in "$@"; do > type -P $c >&/dev/null || { > Pe "$0#$LINENO: Cannot find %s", "$c" > exit 1; } > alias $c=$(type -P $c); > done > } > > > This is a perfect

Re: alias problem -- conflict found

2019-07-12 Thread L A Walsh
On 2019/07/12 11:51, Eli Schwartz wrote: > ... How often do you need to re-type out a production script, that you > feel a strong desire to optimize for ease of re-typing out rather than > readability? > Never. > I am mind-boggled that you don't grasp a very very simple programming > need-to-do:

Re: alias problem -- conflict found

2019-07-12 Thread Eli Schwartz
On 7/12/19 1:22 PM, L A Walsh wrote: >> Hidden optimisations - things that make execution faster but do not >> otherwise change the results are fine. >> >> Mechanisms that are being used for no other useful purpose than to >> obscufate the code are something entirely different. >> > > T

Re: alias problem -- conflict found

2019-07-12 Thread L A Walsh
On 2019/07/10 21:46, Robert Elz wrote: > | Both are a simple substitution that bash gives the > | appearance of being the same mechanism. > > > The two are not even slightly similar (regardless of what the > implementations happen to be, and regardless of mechanisms added > (only in bash

Re: alias problem -- conflict found

2019-07-11 Thread Chet Ramey
On 7/11/19 12:46 AM, Robert Elz wrote: > cd -L and pwd -L which are truly evil Let's not go too far over the top, eh? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tisw

Re: alias problem -- conflict found

2019-07-10 Thread Robert Elz
Date:Wed, 10 Jul 2019 19:46:58 -0700 From:L A Walsh Message-ID: <5d26a322@tlinx.org> | But it was what I was thinking when I said they were the same. None of us are mind readers, we cannot know what you were thinking, only what you said (typed). If you're

Re: alias problem -- conflict found

2019-07-10 Thread Eli Schwartz
On 7/10/19 10:46 PM, L A Walsh wrote: > To have some horrible disdain for one form of substitution > but have no problem with the other being done automatically, doesn't > appear to be a very rational point of view. Don't worry, I hate the idea of using either one for the purpose of turning ba

Re: alias problem -- conflict found

2019-07-10 Thread L A Walsh
On 2019/07/10 11:04, Chet Ramey wrote: > On 7/10/19 12:01 PM, L A Walsh wrote: > > >> What do you think aliases are? They are both a simple hash substitution. >> > > They might appear superficially similar, and they use similar internal > abstractions. > > >> declare -A BASH_CMDS=([l

Re: alias problem -- conflict found

2019-07-10 Thread Chet Ramey
On 7/10/19 12:01 PM, L A Walsh wrote: > What do you think aliases are? They are both a simple hash substitution. They might appear superficially similar, and they use similar internal abstractions. > declare -A BASH_CMDS=([ls]="/usr/bin/ls" ) > declare -A BASH_ALIASES=([ls]="/bin/ls" ) And I m

Re: alias problem -- conflict found

2019-07-10 Thread Robert Elz
Date:Wed, 10 Jul 2019 09:01:28 -0700 From:L A Walsh Message-ID: <5d260bd8.8010...@tlinx.org> | What do you think aliases are? I know exactly what aliases are. (I could just say "useless" but that's a different kind of what they are than you mean.) | They are b

Re: alias problem -- conflict found

2019-07-10 Thread Chet Ramey
On 7/10/19 8:01 AM, L A Walsh wrote: > Aliases are used internally by bash to store path lookups, by > default. No, they are not. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.edu

Re: alias problem -- conflict found

2019-07-10 Thread L A Walsh
On 2019/07/10 08:29, Robert Elz wrote: > > | Aliases are used internally by bash to store path lookups, by > | default. > > Really? I haven't looked at any bash code in a very long time > (for licensing reasons, I don't want to be corrupted by the GPL) > but that sounds like a very weird w

Re: alias problem -- conflict found

2019-07-10 Thread Greg Wooledge
On Wed, Jul 10, 2019 at 10:29:14PM +0700, Robert Elz wrote: > From:L A Walsh > | Functions can't process their arguments in the current scope. > > I have no idea what you're getting at there. She wants something like Tcl's [uplevel] command, most likely. http://www.tcl.tk/man/tcl8

Re: alias problem -- conflict found

2019-07-10 Thread Robert Elz
Date:Wed, 10 Jul 2019 05:01:28 -0700 From:L A Walsh Message-ID: <5d25d398.7010...@tlinx.org> | You are going to tell me that saying | int i=1 is too obscure to be deciphered by most, versus | declare -i i=1; People can guess at the first, for the second, they c

Re: alias problem -- conflict found

2019-07-10 Thread L A Walsh
> > > Also not least because aliases are not even ENABLED by default in scripts, > Depends on whether or not you are using a POSIX compatible shell. > In your case, you are trying to dress up bash to look like perl. --- I use 1 prefix from perl, 'my' perl doesn't have int, array o

Re: alias problem -- conflict found

2019-07-10 Thread L A Walsh
On 2019/07/10 06:37, Greg Wooledge wrote: > > By what metric is "Export" shorter than "-x", or "Map" shorter than "-A", > or "Int" shorter than "-i"? Certainly not character or byte counts. Nor > keystrokes. > > declare -[xAi] = 10 characters int = 3 map=3, array = 5

Re: alias problem -- conflict found

2019-07-10 Thread L A Walsh
On 2019/07/10 06:22, Chet Ramey wrote: > On 7/9/19 11:24 PM, L A Walsh wrote: > > >> >> 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

Re: alias problem -- conflict found

2019-07-10 Thread Greg Wooledge
On Tue, Jul 09, 2019 at 08:24:30PM -0700, L A Walsh wrote: > > On Mon, Jul 08, 2019 at 03:30:47PM -0700, L A Walsh wrote: > >> alias my='declare ' Export='\-x ' Map='-A ' Int='-i ' > All of them are shorter than their original forms By what metric is "Export" shorter than "-x", or "Map" sh

Re: alias problem -- conflict found

2019-07-10 Thread Chet Ramey
On 7/9/19 11:24 PM, L A Walsh wrote: > > 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. Clarity is fine, but it's an

Re: alias problem -- conflict found

2019-07-10 Thread Pierre Gaston
On Wed, Jul 10, 2019 at 2:03 PM L A Walsh wrote: > > > On 2019/07/10 00:04, Robert Elz wrote: > > Date:Tue, 09 Jul 2019 20:24:30 -0700 > > From:L A Walsh > > Message-ID: <5d255a6e.4060...@tlinx.org> > > > > | Why? What makes clarity "horrible". > > > > It isn'

Re: alias problem -- conflict found

2019-07-10 Thread L A Walsh
On 2019/07/10 00:04, Robert Elz wrote: > Date:Tue, 09 Jul 2019 20:24:30 -0700 > From:L A Walsh > Message-ID: <5d255a6e.4060...@tlinx.org> > > | Why? What makes clarity "horrible". > > It isn't the clarity (if you call it that, it is really obscurity > as no-o

Re: alias problem -- conflict found

2019-07-10 Thread Robert Elz
Date:Tue, 09 Jul 2019 20:24:30 -0700 From:L A Walsh Message-ID: <5d255a6e.4060...@tlinx.org> | Why? What makes clarity "horrible". It isn't the clarity (if you call it that, it is really obscurity as no-one else can read your scripts/commands and have any idea

Re: alias problem -- conflict found

2019-07-09 Thread Eli Schwartz
On 7/9/19 11:24 PM, L A Walsh wrote: > 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 >> mo

Re: alias problem -- conflict found

2019-07-09 Thread L A Walsh
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 s