Bug#758542: dash: defining an alias with a backslash should return an error

2023-01-08 Thread наб
Control: clone -1 -2 Control: retitle -2 dash: accepts anything as an alias name and doesn't quote it, then eval $(alias) will run alias as code Control: tags -2 - wontfix Control: tags -2 + fixed-upstream On Sat, Dec 17, 2022 at 08:11:57PM +0100, наб wrote: > Indeed; escaping of any kind

Bug#758542: dash: defining an alias with a backslash should return an error

2022-12-19 Thread наб
Hi! On Tue, Dec 20, 2022 at 01:09:47AM +0100, Vincent Lefevre wrote: > On 2022-12-19 23:46:48 +0100, наб wrote: > > As in one /can/ accept anything in the name (XBD, 3.10 Alias Name), > > but /must not/ expand aliases when the word is in any way quoted. > I would say that "\mv" is a quoted

Bug#758542: dash: defining an alias with a backslash should return an error

2022-12-19 Thread Vincent Lefevre
On 2022-12-19 23:46:48 +0100, наб wrote: > I didn't even try the expansion behaviours, because none of them should > expand, and zsh is wrong to do this (quoting my patch from forwarded-to): > + * POSIX Issue 7, XCU, 2.3.1 Alias Substitution: > + * the command name word of a simple command shall

Bug#758542: dash: defining an alias with a backslash should return an error

2022-12-19 Thread наб
Hi! On Mon, Dec 19, 2022 at 11:29:36PM +0100, Vincent Lefevre wrote: > On 2022-12-19 22:58:44 +0100, наб wrote: > > This makes dash, as you note, incompatible with ksh93 and bash, > > but compatible with zsh in this regard. Seeing as this is an extension > > to POSIX (which requires that the name

Bug#758542: dash: defining an alias with a backslash should return an error

2022-12-19 Thread Vincent Lefevre
On 2022-12-19 22:58:44 +0100, наб wrote: > This makes dash, as you note, incompatible with ksh93 and bash, > but compatible with zsh in this regard. Seeing as this is an extension > to POSIX (which requires that the name matches [a-zA-Z0-9_!%,@]+), > both approaches are valid. No, it is still

Bug#758542: dash: defining an alias with a backslash should return an error

2022-12-19 Thread наб
Control: tags -1 + wontfix Rejected by upstream, citing minimalness. A related fix for eval "alias $(alias 'a|b|c=d'; alias)" executing code was accepted (well "will look into it"ed, where "it" is my complete patch? idk), tho. This makes dash, as you note, incompatible with ksh93 and bash,

Bug#758542: dash: defining an alias with a backslash should return an error

2022-12-17 Thread наб
Control: tags -1 + upstream patch Control: forwarded https://lore.kernel.org/dash/20221217190705.atfwacsgggtaf...@tarta.nabijaczleweli.xyz/t/ Indeed; escaping of any kind (quoting or backslash) disables alias expansion. What's even more fun is that if you do alias "a'b=c" "ls=cd" then alias

Bug#758542: dash: defining an alias with a backslash should return an error

2014-08-18 Thread Vincent Lefevre
Package: dash Version: 0.5.7-4 Severity: wishlist With dash, one can defined an alias with a backslash: $ alias '\mv=echo ab' $ alias \mv='echo ab' but it can't be used: $ \mv mv: missing file operand Try 'mv --help' for more information. So, it would be better to return an error like with