]> Cypherpunks repositories - gostls13.git/commit
os: make ExpandEnv recognize '-' as a special shell parameter
authorLE Manh Cuong <cuong.manhle.vn@gmail.com>
Sun, 31 Jul 2016 16:10:35 +0000 (23:10 +0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 21 Aug 2016 18:32:57 +0000 (18:32 +0000)
commit1756b665980613cf655d6ecde709a032568963b0
treed8302d1577f5757c1793772c441b6699f262380d
parent4338e5a8914be2216de09363288177c806ef845e
os: make ExpandEnv recognize '-' as a special shell parameter

'-' is one of shell special parameters.

The existing implementation of isShellSpecialVar missed '-'
from the list, causing "$-" and "${-}" expand differently.

Fixes #16554

Change-Id: Iafc7984692cc83cff58f7c1e01267bf78b3a20a9
Reviewed-on: https://go-review.googlesource.com/25352
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/env.go
src/os/env_unix_test.go