Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xiaq/upgrade-scripts-for-0.11
Upgrade scripts for 0.11
https://github.com/xiaq/upgrade-scripts-for-0.11
Last synced: 21 days ago
JSON representation
Upgrade scripts for 0.11
- Host: GitHub
- URL: https://github.com/xiaq/upgrade-scripts-for-0.11
- Owner: xiaq
- Created: 2017-12-18T18:24:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-18T19:37:01.000Z (about 7 years ago)
- Last Synced: 2024-12-02T08:56:43.581Z (23 days ago)
- Language: Go
- Size: 36.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Upgrade Scripts for 0.11
## Scope
This tool accodomates one change introduced in the 0.11 release: variable name for functions used to be prefixed with `&`, but are now suffixed with `~`.
Before:
```
'&x' = { echo x }
# equivalent to "fn x { echo x }"
echo $&x
```After:
```
x~ = { echo x }
echo $x~
```Since `~` is now allowed as part of variable name, it also fixes code like
```
echo $x~2
```to
```
echo $x''~2
```Also, `&` is now forbidden in variable names. If a variable contains `&` after
rewriting, a warning is printed.It does not address other compatibility breaks.
## Invocation
This tool can be invoked in one of two ways:
* Without arguments, it reads stdin and writes stdout.
* With filename arguments, it rewrites each given file.
It does not accept any flags.