bash: Fix substring expansion with negative offset (#947)

Co-authored-by: Rico Sta. Cruz <rstacruz@users.noreply.github.com>
This commit is contained in:
hyww 2020-07-05 19:04:28 +08:00 committed by GitHub
parent aff27988e0
commit a54b580e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ echo ${STR/foo/bar} # /path/to/bar.cpp
```bash ```bash
STR="Hello world" STR="Hello world"
echo ${STR:6:5} # "world" echo ${STR:6:5} # "world"
echo ${STR:-5:5} # "world" echo ${STR: -5:5} # "world"
``` ```
```bash ```bash