Skip to content

Releases: shellgei/rusty_bash

v1.1.5

07 May 07:15

Choose a tag to compare

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 -r for an element of an array

Full Changelog: v1.1.4...v1.1.5

v1.1.4

20 Apr 00:24

Choose a tag to compare

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 IFS compatibility when $* is used
    • Support of the heredocument with <<-
    • Fix of getopts when it is used in a function

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

13 Apr 04:42

Choose a tag to compare

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 ))
0

We 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 3

solved 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
OK

It's fixed at v1.1.3.

source test.bash 2> /dev/null
OK

Full Changelog: v1.1.2...v1.1.3

v1.1.2-beta

12 Apr 00:24

Choose a tag to compare

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))
6

other improvement

  • support of globskipdots
  • support of REPLY
  • support of read -n
  • support of %u, %o, %i on printf
  • support of declare -i

Full Changelog: v1.1.0...v1.1.2

v1.1.0-beta

02 Apr 00:27

Choose a tag to compare

Additional implementation

  • Addition on printf command
    • 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 let command
  • Support of definition of functions without () when function keyword is used
  • Implementation of (nearly) accurate behavior of read and set toward IFS
  • Enable to refer positional parameters after ${10}
  • Implementation of globstar

Full Changelog: v1.0.8...v1.1.0

v1.0.8-beta

23 Mar 03:19

Choose a tag to compare

Stability enhancement and addition of some features

  • Enabled to use here documents and here strings on terminal without fork
  • Enabled read to remove escapes
  • Enlarged the range of numbers from 32bit to 64bit on the brace expansion {n..m}
  • Added -b option for bash compatibility

Full Changelog: v1.0.6...v1.0.8

v1.0.6

17 Mar 08:04

Choose a tag to compare

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

07 Mar 08:51

Choose a tag to compare

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

04 Mar 08:55

Choose a tag to compare

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 -W unexpanded 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]}} when name is an associative array
  • Enabled to give arguments to source
  • Fixed some bugs

Full Changelog: v1.0.2...v1.0.4

v1.0.3-beta

03 Mar 09:07

Choose a tag to compare

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