On Fri, 27 Oct 2023 15:34:16 +0100
Kerin Millar <k...@plushkava.net> wrote:

<snip>

> Keep in mind that the Shell Command Language specification requires that 
> "Default Value" parameter expansion be implemented in the way that it is, and 
> that there are countless scripts that depend on the status quo. However, the 
> Shell Command Language also doesn't suffer from this ambiguity because it 
> doesn't specify any means of performing "Substring Expansion" to begin with 
> (it's a bash extension). Since there is no way for bash to otherwise know 
> that "-10:1" wasn't intended as the word in ${parameter:-word}, you'll have 
> to choose a preferred workaround for negative offsets and live with it, as 
> irksome as it may be.

Of course, I meant to write "10:1" there, not "-10:1".

-- 
Kerin Millar

Reply via email to