bug-bash
[Top][All Lists]
Advanced

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

`${@:0}' expands to `$0 $1 ...', even though `$0' is not a positional pa


From: Oğuz
Subject: `${@:0}' expands to `$0 $1 ...', even though `$0' is not a positional parameter
Date: Wed, 3 Mar 2021 16:59:54 +0200

The manual says:
>A positional parameter is a parameter denoted by one or more
>digits, other than the single digit 0.

And about `${@:offset:length}', this is what's written there:
>If parameter is @, the result is length positional
>parameters beginning at offset.

Given these statements, I wouldn't expect `$0' to be included in the
expansion of `${@:0}', yet it is.

Wouldn't it be better if it said
> ... beginning at offset, including $0 if offset is zero.
or something like that instead?


-- 
Oğuz


reply via email to

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