Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Eli Schwartz Newsgroups: gnu.bash.bug Subject: Re: alias problem -- conflict found Date: Wed, 10 Jul 2019 23:13:10 -0400 Lines: 182 Approved: bug-bash@gnu.org Message-ID: References: <5D25D398.7010300@tlinx.org> <5D255A6E.4060600@tlinx.org> <5D23C417.5060108@tlinx.org> <20190709132112.GW2450@eeg.ccf.org> <10340.1562742284@jinx.noi.kre.to> <11760.1562772554@jinx.noi.kre.to> <5D260BD8.8010800@tlinx.org> <480d3363-dce0-6629-b1f6-bca0b006cc88@case.edu> <5D26A322.109@tlinx.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5ubWKmXodeEjiMPAAM7LRtBp9S5uoYUCi" X-Trace: usenet.stanford.edu 1562814806 2341 209.51.188.17 (11 Jul 2019 03:13:26 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1562814794; bh=/esLAsAp7RDTVeFxMmbQY1s2nYUUvSq9mTe4dnjt/bI=; h=Subject:To:References:From:Date:In-Reply-To; b=n2wYYV2bLx3a2Q1pDIR9bFKH+AmEsnxcgO8AmHuAbITVxjt+pLcvpm9TVqG6H+/uP MEtNuvD8GcvxEIczyJ3axZ2FY1xzM8XJ2G7auuYKg5HGgDqABDG/dBBjTXUd/TG6RX 4TGPJruoDOHsBd8y2H4HFHX5x299yrrnlg6IzHYpAKjPo8q80e1gQVMTDq9UJoZ5Wp VCG2uzq1sxmMi+ia7ilRP3wrY1ZdFDxXUCVWMvzv0lJgejW+p4SVLVyTNpfrCbGrxP iLFZTo+i9A43gYe5AL2MAJPxK7bo/X1qjtx+9MacANCWB6Kl6AWa0Nd6MFqgD+DEOF mIjqZymf+Fj4G45Q25ZajP4QbUI6bzwngnIHkg2QWYetlmbPSBUqdnXv8/s4DyQ4Dx fmAdqbu7qvvSx9aNF/xn5cPotx8bCrzH+/H0wW3G9BJB7Cm16pmQgdv+h6ofQ+sSRu 8IgF0kGGcXRmpsceSdNJoZtzCV12NyR2LT4pAqljFSbXcfvWBBV1Se2pNYcSSizUmm /8kW1gVi4bmtjua1fvJ4PEbd4FTstN4971q69ZlxVCdEC2aD5Dte5OaXF+Ul0qYYnZ f+B0+2dPE3rDSubf8S/PIJN+QIWIP0oj2izaWitIPWYpr511U1aMtMJfJP1SLVwN53 INXXE6pLUUyqfUemk7uTd8G8= Openpgp: preference=signencrypt X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 In-Reply-To: <5D26A322.109@tlinx.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:4f8:160:6087::1 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: <5D25D398.7010300@tlinx.org> <5D255A6E.4060600@tlinx.org> <5D23C417.5060108@tlinx.org> <20190709132112.GW2450@eeg.ccf.org> <10340.1562742284@jinx.noi.kre.to> <11760.1562772554@jinx.noi.kre.to> <5D260BD8.8010800@tlinx.org> <480d3363-dce0-6629-b1f6-bca0b006cc88@case.edu> <5D26A322.109@tlinx.org> Xref: csiph.com gnu.bash.bug:15130 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5ubWKmXodeEjiMPAAM7LRtBp9S5uoYUCi Content-Type: multipart/mixed; boundary="bIPLGU634Xxc50XJ3KrMxTYorrM2FWx6c"; protected-headers="v1" From: Eli Schwartz To: bug-bash@gnu.org Message-ID: Subject: Re: alias problem -- conflict found References: <5D25D398.7010300@tlinx.org> <5D255A6E.4060600@tlinx.org> <5D23C417.5060108@tlinx.org> <20190709132112.GW2450@eeg.ccf.org> <10340.1562742284@jinx.noi.kre.to> <11760.1562772554@jinx.noi.kre.to> <5D260BD8.8010800@tlinx.org> <480d3363-dce0-6629-b1f6-bca0b006cc88@case.edu> <5D26A322.109@tlinx.org> In-Reply-To: <5D26A322.109@tlinx.org> --bIPLGU634Xxc50XJ3KrMxTYorrM2FWx6c Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: quoted-printable 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 bash into some typedef perl/C wannabe. My disdain is truly equal-opportunity. > Various commands can be implemented via separate programs or via > bash-builtins. The bash-builtins are a form of a built-in alias for > the command in that they are both intended to have a similar function, > however, the disk based and builtin functions often have differences, > but not usually when used within some standard, documented subset. So now you think that `builtin echo` is an "alias" for /bin/echo simply because they have similar functionality? Is printf by any chance an alias for echo -n, because it sometimes does the same thing, and therefore their effects are "similar"? Are we on camera? Is this just deliberate trolling? > Similarly while bash has variables builtin, it seems conceivably > possible that 'declare' could be implemented as an external command > with all of the flags it supports. It could get context of where it wa= s > called from via FUNCNAME, *_SOURCE and *_LINENO while storing the varia= bles > in a disk-based database. Why don't you go implement a disk-based database for bash's internal stack. Let's see how that goes. It's conceivably possible that someone might drill an air hole in their own head, but I don't consider it very likely or reasonable. The fact that there is no law of physics forbidding it is not actually a great proof to, well, anything. > It is very common for aliases to be used to give alternate forms to= > 'ls', like 'dir', 'll', etc. In some implementations they are implemen= ted > as shell-aliases, while in others file-system aliases (links both hard > and sym > or softlinks).=20 None of that is attempting to typedef an internal feature of the programming language itself. > Some OS's besides implementing them as a link in the file > system, can/do list them using some form of database: expandable paths > in Windows, multi-valued destinations for different tools in linux unde= r > /etc/alternatives, and user-specific automounter-type mounts that gener= ate > different paths for different users. Offtopic? /etc/alternatives is there to let a system administrator choose what "foo" is on a specific computer as opposed to in a vendor's default configuration. FUSE filesystems that expose different content depending on which user accesses it, is not even something I've seen used before for manipulating the available *commands* on a system -- that's going to be used for (typically networked) *data*. I have no idea what an "expandable paths in Windows" are, but if you're suggesting the equivalent of "PATH=3D$HOME/bin:$PATH" in /etc/profile, then that's hardly a Windows feature, plus, it's still not remotely comparable to using "bash: revenge of the typedef". > Not too long ago, some people pushed for restrictions on what you > could have a pointer (symlink no less) on disk point to -- even though > it can't override filesystem protections -- sorta reminds me of links > on the internet pointing at a topic and people going after the people > pointing to the topic with the link as "offenders" or "intruders"... > Both seem equally lame. >=20 > All of these can be used as substituting one thing for another, som= e > proving a simple macro-type name substitution, while others can change > what you think you are using entirely, while others, some believe, > create invasions or intrusions...whatever. Changing what you think you are using entirely seems pretty silly, wouldn't you rather *know* what you're using? > Certainly, functions can be subjected to more abuse than aliases as= > was evidenced when security related problems surfaced with functions. = Some > spoke 'feature-hate' about functions just as some do about aliases here= =2E >=20 > To claim this or that is superior or different from any of the othe= r > multitude of technologies that provide similar functionality, but with > variable features seems like arguing about what colors are ugly and > distasteful > for use in TTY backgrounds and text. >=20 > These are technical features. I get that you worship some features= over > others. That's nice, just don't expect to convert me with propaganda a= nd > opinion. They all suck. They suck the way you are using them, and they will continue to suck even if you implement them via functions instead. It's not a matter of which is better or worse because it is capable of being subjected to more abuse. It is a matter of "omg, this Linda Walsh person is a person who habitually goes around trying to figure out ways to abuse every tool she can get her hands on". That, right there, is the problem. You want to abuse things. And lo and behold, you have found ways. Don't go around expecting other people to *not* look askance when they see you do it. --=20 Eli Schwartz --bIPLGU634Xxc50XJ3KrMxTYorrM2FWx6c-- --5ubWKmXodeEjiMPAAM7LRtBp9S5uoYUCi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEvSewel70XCra9w4EhIGKaBmvSp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