Releases: shellgei/rusty_bash
v1.2.9
Adding some features
We added some features related to the cases in https://github.com/shellgei/rusty_bash_test/blob/v1.2.9/test_fixed.bash .
Full Changelog: v1.2.7...v1.2.9
Completion of coproc implement
We fixed rough implementation around coproc. This version passes the official coproc test of Bash: https://github.com/ryuichiueda/bash_for_sush_test/blob/master/tests/coproc.tests .
Implementation of enable and enable -n
This is an example of usage.
🍣 type wait
wait is a shell builtin
🍣 enable -n wait
🍣 type wait
sush: type: wait: not found
🍣 enable wait
🍣 type wait
wait is a shell builtinImplementation of ulimit -n
We can restrict the maximum number of file descriptors with this option.
🍣 ulimit -n 5
🍣 echo a | cat | cat | cat | cat | cat
target/debug/sush: cannot make pipe: Too many open files
Implementation of read -u <file descriptor>
With this option, we can change the file descriptor that read use.
🍣 read -ru3 x 3< <(echo bbb); echo $x
bbbOthers
- Fixed some bugs on the parameter expansion
- Enabled to use FD3 or larger number FDs when
execopens a file and connects to an FD.
v1.2.7
Fix and Addition
We fixed some bugs and added some features related to the cases in https://github.com/shellgei/rusty_bash_test/blob/v1.2.7/test_fixed.bash .
Bug fixes
Followings are fixed.
- an
unsetrule when there are variables with the same name in different scopes - nameref rules
- the difference between builtin/external
testcommands
### an example on Bash ###
bash-5.2$ [ -n = -n ]
bash-5.2$ echo $?
0
bash-5.2$ /usr/bin/[ -n = -n ]
/usr/bin/[: extra argument '-n'
bash-5.2$ echo $?
2Additional features
🍣 echo *
core core.rs elements elements.rs error error.rs feeder feeder.rs i18n.rs main.rs main_c_option.rs proc_ctrl.rs signal.rs utils utils.rs
🍣 set -f
🍣 echo *
*New Contributors
Full Changelog: v1.2.6...v1.2.7
v1.2.6
Fixed a bug that makes sush slow on WSL2
We removed a bug that calls a path search procedure when an internal command is called in a pipeline. It was critical in WSL2 because a path search procedure for a non-existent command takes tens of seconds. It also made bash-completion slow in many cases.
We also fixed some bugs related to the three test cases in https://github.com/shellgei/rusty_bash_test/blob/v1.2.6/test_fixed.bash .
Full Changelog: v1.2.5...v1.2.6
v1.2.5
Fix for bash-completion
This version additionally passed the test cases in https://github.com/shellgei/rusty_bash_test/blob/v1.2.5/test_fixed.bash .
What's fixed
- Enabled to use -- on
declare- e.g.
declare -f -- some_func
- e.g.
- Regarded the number of element of a scalar variable as 1 if it is initialized.
🍣 a=
🍣 echo ${#a[*]}
1- Implemented the reaction of
shopt -q - Fixed the behavior of
unsetwhenlocalvar_unsetis not defined.
Full Changelog: v1.2.4...v1.2.5
v1.2.4
Addition of features
This version additionally passed the test cases in https://github.com/shellgei/rusty_bash_test/blob/v1.2.4/test_fixed.bash .
What's Changed
- Supported coprocess (
coproccommand)
🍣 coproc HOGE { while read A ; do echo "HOGE" $A ; done ; }
[1] 365259
🍣 echo bbb >&${HOGE[1]}
🍣 read V <&${HOGE[0]}
🍣 echo $V
HOGE bbb
🍣 echo ccc >&${HOGE[1]}
🍣 read V <&${HOGE[0]}
🍣 echo $V
HOGE ccc
🍣 jobs
[1]+ Running coproc HOGE { while read A ; do echo "HOGE" $A ; done ; } &
🍣 kill %1
🍣 jobs
[1]+ Done coproc HOGE { while read A ; do echo "HOGE" $A ; done ; }
🍣 jobs
🍣- Supported nameref
🍣 A=123
🍣 declare -n B=A # B becomes a reference of A
🍣 B=xyz
🍣 echo $A
xyz-
Spported
FUNCNUMEandBASH_LINENO -
Impremented
callerroughly -
Fixed clippy warnings by @LifelessPumpkin in #172
-
Fixed bugs around arrays
New Contributors
- @LifelessPumpkin made their first contribution in #172
Full Changelog: v1.2.3...v1.2.4
v1.2.3
Compatibility Enhancements
This version additionally passed the test cases in test_fixed_v1.2.3.bash.
What's Changed
-
supported
localvar_inheritandlocalvar_unset -
conformed the behavior of here-documents with Bash when the end marker is not independent in a line.
🍣 A=$(cat << EOF
aaa
EOF) # required a line break before )
echo $A
sush: warning: here-document at line 1 delimited by end-of-file (wanted `EOF')
aaa. # The value "aaa" is substituted to A though the above error message is given.- supported the combination of
>()and the subsequent pipe
🍣 echo 123 | tee >(rev) | rev --
321
123Bug
We found that some functions of the latest bash-completion for Ubuntu 25.04 don't work. Basic file completion works well.
Full Changelog: v1.2.2...v1.2.3
v1.2.2
Compatibility Enhancements
This version additionally passed the test cases in test_fixed_v1.2.2.bash. Moreover, this version passed all of the cases in ifs-posix.tests, which is a test script in Bash official repo. It's amazing.
detalis
- Fixed IFS problems
🍣 a=$'ab\001cd\001ef'; IFS=$'\001'; b=$'uv\177wx\177yz'; for w in ab${b}y${a}z ; do echo $w ; done
abuvwxyzyab
cd
efz
🍣 IFS=$' \t\n'
🍣 x=" a" ; set $x ; echo @$1@
@a@
🍣 IFS=": "; x=" a" ; set $x ; echo @$1@
@a@
🍣 IFS=": "; x=" a" ;echo @$x@
@ a@
🍣 IFS=$' \t\n'- Fixed
set -problems
🍣 set x - ; echo $2
-
🍣 str="-"; set x $str ; echo $2
-
🍣 set "" ""; f() { echo $# ; } ; f "$@"
2
🍣 set "" ; f() { echo $# ; } ; f "$@"
1
🍣 set "" ; f() { echo $# ; } ; f "${@}"
1- Fixed bugs around arrays
🍣 c=(outside) ; f() { readonly c=(3) ; }; f; declare -p c
declare -ar c=([0]="3")
🍣 c=(outside) ; f() { readonly 'c=(3)' ; }; f; declare -p c
declare -ar c=([0]="(3)")
🍣 r=(1) ; f() { export r='(5)' ; }; f; declare -p r
declare -ax r=([0]="(5)")- Support
printf %#x
🍣 printf "%#x\n" 12
0xc
🍣 printf "%#x\n" "'1"
0x31
🍣 printf "%#x\n" "'あ"
0x3042
🍣 tmp=$'\x7f'; printf "%#1x\n" "'$tmp"
0x7f- Fixed bugs of
continue
🍣 for i in a b c; do echo $i; continue; echo bad-$i ; done; echo end-1
a
b
c
end-1- Fixed value check rules of braced variables
🍣 f() { echo "-${*-x}-" ; } ; f ""
--
🍣 echo F=~
F=/Users/ueda
🍣 echo ${A:-\a}
a
🍣 echo "${A:-\a}"
\a
🍣 echo ${A:-~}
/Users/ueda
🍣 echo "${A:-~}"
🍣 : ${A:=~}; echo $A
/Users/ueda
🍣 : ${A:=~:aa}; echo $A
/Users/ueda
🍣 : ${A:=~/bin:~/bin2}; echo $A
/Users/ueda
🍣 : ${A:=B=~/bin:~/bin2}; echo $A
/Users/ueda
🍣 B=aaa;C=D=~/bin:$B; echo $C
D=~/bin:aaa- Fixed tilde expansion rules in here-documents
🍣 cat << EOF
> ~
> EOF
~
🍣 cat << EOF
> ~/bin
> EOF
~/binFull Changelog: v1.2.1...v1.2.2
v1.2.1
Fixes around arrays and associative arrays and implementation of some features
We (four contributors!) have enhanced and revised various features. You can see the test script for v1.2.1 on https://github.com/shellgei/rusty_bash_test/blob/v1.2.1/test_fixed.bash .
support of >() (halfway)
🍣 echo 123 | tee >(rev) >(fold -b1) -
123
1
2
3
321
### issue: not yet connected to the subsequent pipe ###
🍣 echo 123 | tee >(rev) >(fold -b1) - | rev
1
2
3
321
321
#stopping here
^CPid: Pid(15326), Signal: SIGINTfixes around arrays and associative arrays
- support of element append on associative arrays
🍣 declare -A a=( [i]=abc ) ; a+=( [i]+=def ); declare -p a
declare -A a=([i]="abcdef" )- support of integer mode on associative arrays
multi-language support by @LinuxBoy-96
$ LANG=ja_JP.UTF8 sush
Homebrew Bash completions do not work in POSIX mode
Sushi shell (a.k.a. Sush), バージョン 1.2.1 - release
🍣 exit
$ LANG=ar_AR.UTF8 sush
Homebrew Bash completions do not work in POSIX mode
Sushi shell (a.k.a. Sush), إصدار 1.2.1 - release
🍣 others
- fixes for Android by @YumeYuka
- fixes based on clippy warnings by @t-koba
- implementation of
declare -u - implement of ulimit (halfway)
- implement of
@k, @K, @Qfor parameters
🍣 a=abc ; echo ${a@k}
'abc'
🍣 A=(a b) ; echo "${A[@]@K}"
0 "a" 1 "b"
🍣 A=(a b) ; echo "${A[@]@Q}"
'a' 'b'merged pull requests
- Add Fluent support and more by @LinuxBoy-96 in #146
- Cleaned, improved, and add comments by @LinuxBoy-96 in #147
- Add --help Support - improved by @LinuxBoy-96 in #151
- Compile-time language support + Name change + Panic abort by @LinuxBoy-96 in #152
- Fix bugs built on Android by @YumeYuka in #153
- Fix: "No resources found for language" error in ja_JP by @t-koba in #156
- Retry clippy (733 to 164) by @t-koba in #163
- Retry clippy (164 to 2) by @t-koba in #164
change log
Full Changelog: v1.2.0...v1.2.1
Thank you for all users and contributers!
v1.2.0
Enhanced Compatibility around Variables and Parameters
We have fixed subtle different behaviors between Bash and Sush mainly based on the run-array script in https://github.com/ryuichiueda/bash_for_sush_test/tree/master/tests . We can see the added test cases for this version from v1.1.8 in https://github.com/shellgei/rusty_bash_test/blob/v1.2.0/test_fixed.bash .
- supported
declare -f - fixed the difference between Bash and Sush on the handlings of arrays and associative arrays
- I can't explain these very subtle fixes. Please see the cases in the URL indicated above.
- fixed out put of
declare -p
Full Changelog: v1.1.8...v1.2.0
v1.1.8
Improvement of compatibility to Bash
We add various features and bug fixes to this version from v1.1.6. Added test cases are as follows:
- v1.1.6 -> v1.1.7: https://github.com/shellgei/rusty_bash_test/blob/v1.1.7/test_fixed.bash
- v1.1.7 -> v1.1.8: https://github.com/shellgei/rusty_bash_test/blob/v1.1.8/test_fixed.bash
What's Changed
- Added support for Android platform by @YumeYuka in #143
- Enabled to apply the integer mode to arrays and associative arrays
- Fixed some bugs around IFS
- Enabled to read a value to an element of an array
### an example ###
🍣 read hoge[1] <<< abc
🍣 echo ${hoge[1]}- Enabled to use
unsettoward an array element - Considered
${a[ ]}as${a[0]} - Enabled to show the list of traps with
trapcommand - Supported options
-aoption (auto export of variables)-Coption (protection of files at redirects)- execfail
- lastpipe
- Fixed single quoting rule on the value check of double quoted braced parameters
$ echo "${A-'"""'hey}"
''hey
$ echo "${A-'"\"'hey}"
'"'hey
$ echo "${A-'"aa"'hey}"
'aa'hey- Fixed
evalandletcommands
New Contributors
Full Changelog: v1.1.6...v1.1.8