Releases: shellgei/rusty_bash
v1.1.5
Compatibility improvement
We add some features to this shell and fix some incompatible behaviors based on the test in official Bash repo. See additional test cases between v1.1.4 and v1.1.5 in our test.
- Fixed the behavior of our shell when it is feeded a shell script containing lines that should be read by a command in the shell script.
### example ###
🍣 echo 'cat
> This line is read by the above cat' | sush
This line is read by the above cat- Invalidate ANSI-C quoting in here documents
- Implemented substitutions for every element in an array
### example ###
🍣 set abc abc; echo ${*/a/A}
Abc Abc- Enabled to parse $"..." (roughly)
- Enabled to use
declare -rfor an element of an array
Full Changelog: v1.1.4...v1.1.5
v1.1.4
Compatibility improvement
- Supported the followings
- Initialization of arrays or associative arrays with indexes (e.g.
A=([4]=hato [1]=yaha [2]=yoi [6]=furo)) - Enabled to use
$!(PID of the latest background job) - Support of the empty blacket
[]on file glob - Immediate abort of a case command at an error of arithmetic expansion in a pattern
- Improvement of
IFScompatibility when$*is used - Support of the heredocument with
<<- - Fix of
getoptswhen it is used in a function
- Initialization of arrays or associative arrays with indexes (e.g.
other important change
The test scripts under test were relocated to another repository because they contains test cases derived from the Bash repository licenced under GPL.
- The test cases added for this version can be seen in this file.
Full Changelog: v1.1.3...v1.1.4
v1.1.3
Fixed terrible bugs
I'm extremely sorry. That's terrible.
solved calculation problem
The implementation of arithmetic expressions in v1.1.2 has passed all of the tests in Bash repo. However, it mistook the following simple calculation. That is because the calculation was evaluated from the right side, ... and because our repo and Bash repo missed such an easy test case.
### It's wrong. (terrible) ###
🍣 echo $(( 1 - 2 + 3 ))
0We now fixed and the shell keeps a correct tally.
### calculated from the left side ###
🍣 echo $((1 - 2 + 3))
2
### It must be evaluated from the right side in this case. ###
🍣 a=3 b=3 c=3
🍣 echo $(( a += b += c ))
9
🍣 echo $a $b $c
9 6 3solved an input mixing problem on source command
It's also terrible. The following is the behavior of v1.1.2.
### test.bash ###
echo OK | ( while read line ; do echo $line ; done )
ああああああ!🍣 source test.bash 2> /dev/null
ああああああ! # <- the read command reads the next line of test.bash
OKIt's fixed at v1.1.3.
source test.bash 2> /dev/null
OKFull Changelog: v1.1.2...v1.1.3
v1.1.2-beta
Compatibility Improvements around arithmetic expression, and others
Based on the test in Bash repository, outputs are matched to those of Bash.
Examples
🍣 n=0 a="(a[n]=++n)<7&&a[0]"; ((a[0])); echo "${a[@]}"
(a[n]=++n)<7&&a[0] 1 2 3 4 5 6 7
🍣 unset a
🍣 a=1 ; a[1]=2 ; echo ${a[@]}
1 2
🍣 PARAM=abcdefg; echo ${PARAM:1 ? 4 : 2}
efg
🍣 unset a
🍣 A="a[0]" ;echo $(( ++$A))
1
🍣 a=1 ; echo $((4+ + +a))
5
🍣 a=1 ; echo $((4+ ++a))
6
🍣 a=1 ; echo $((4+++a))
6other improvement
- support of
globskipdots - support of
REPLY - support of
read -n - support of
%u,%o,%ionprintf - support of
declare -i
Full Changelog: v1.1.0...v1.1.2
v1.1.0-beta
Additional implementation
- Addition on
printfcommand- added "%x", "%X" as the formatter
- fixed behavior of "%q"
- enabled to repeatedly output when arguments are more than formatters
- support of format by number on "%d", "%s", "%X" (e.g. "%010d")
- Implementation of
letcommand - Support of definition of functions without
()whenfunctionkeyword is used - Implementation of (nearly) accurate behavior of
readandsettowardIFS - Enable to refer positional parameters after
${10} - Implementation of globstar
Full Changelog: v1.0.8...v1.1.0
v1.0.8-beta
Stability enhancement and addition of some features
- Enabled to use here documents and here strings on terminal without fork
- Enabled
readto remove escapes - Enlarged the range of numbers from 32bit to 64bit on the brace expansion
{n..m} - Added
-boption for bash compatibility
Full Changelog: v1.0.6...v1.0.8
v1.0.6
Stability enhancement for bash-completion
- following supports of commands
shopt -po <command>compgen -G <glob pattern>
- crude implementation of followings
- heredocment
- old style command substitution with backquotes
- implovement of codes
- abstraction of the options in braced parameter substitutions
Full Changelog: v1.0.4...v1.0.6
v1.0.5-beta
Support of file completion at redirects
A bug that prevents completions after redirect symbols is fixed. It is a quick fix version. Details will be expleined in v1.0.6.
Full Changelog: v1.0.4...v1.0.5
v1.0.4-beta
Fix for bash-completion (especially for completion on vim)
Known bugs and unimplemented features around bash-completion are removed.
Added Features
- Enabled to give
compgen -Wunexpanded arrays (e.g.compgen -W '"${toks[@]}"') - Fixed a problem when
a=(a ""); set ${a[@]+"${a[@]}"}is executed. In this case, the number of parameters (the value of$#) must be two - Improved the code for expanding
${name/#...}and${name/%...}and implemented a right substitution way toward${name[@]/...},${name[@]/...}, and{name[@]:i:j} - Fixed a bug at the substitution procedure of
B=${name[key]-${name[key]}}whennameis an associative array - Enabled to give arguments to
source - Fixed some bugs
Full Changelog: v1.0.2...v1.0.4
v1.0.3-beta
Fixed bugs on completion for cd command
This is an emergency update. Some bugs remain for vim command
Full Changelog: v1.0.2...v1.0.3