[adding the Austin Group]
On 02/23/2016 03:07 PM, Oleg Bulatov wrote:
> Hello,
>
> trying to minimize a shell code I found an unobvious moment with heredocs and
> subshells.
Thanks for a cool testcase.
>
> Is it specified by POSIX how next code should be parsed? dash output for this
> code
On 02/23/2016 11:18 AM, Jan Verbeek wrote:
> Function definitions that use a bad function name (such as "-" and "=")
> are accepted if the function name already exists as an alias. For example:
Not necessarily a bug.
>
> $ -
> dash: 1: -: not found
> $ - () { echo hello; }
> dash: 2: Syntax
Function definitions that use a bad function name (such as "-" and "=")
are accepted if the function name already exists as an alias. For example:
$ -
dash: 1: -: not found
$ - () { echo hello; }
dash: 2: Syntax error: Bad function name
$ -
dash: 2: -: not found
$ alias -=true
$ -
$ - () { echo
On 02/23/2016 11:44 AM, Harald van Dijk wrote:
> This matches bash's behaviour, aside from bash requiring -- to prevent
> detection of invalid flags to the alias command:
>
> bash-4.3$ alias -- -=true
Then dash DOES have a bug:
# dash
$ alias -- -='echo hi'
alias: -- not found
$ echo $?
1
$ -
On 02/23/2016 12:21 PM, Harald van Dijk wrote:
> On 23/02/2016 19:58, Eric Blake wrote:
>> On 02/23/2016 11:44 AM, Harald van Dijk wrote:
>>
>>> This matches bash's behaviour, aside from bash requiring -- to prevent
>>> detection of invalid flags to the alias command:
>>>
>>> bash-4.3$ alias --
On 02/23/2016 02:00 PM, Harald van Dijk wrote:
>
> I was under the impression that the intent from the dash side was to
> handle all commands the same, and that impression was based on the fact
> that the . command has received additional code to handle -- even though
> there's no requirement for
On 23/02/2016 20:33, Eric Blake wrote:
exit - fuzzy. exit is a special built-in (unlike getopts); and XCU 2.14
states:
"Some of the special built-ins are described as conforming to XBD
Utility Syntax Guidelines. For those that are not, the requirement in
Utility Description Defaults that
Hello,
trying to minimize a shell code I found an unobvious moment with heredocs and
subshells.
Is it specified by POSIX how next code should be parsed? dash output for this
code differs from bash and zsh.
--- code
prefix() { sed -e "s/^/$1:/"; }
DASH_CODE() { :; }
prefix A