Releases: shellgei/rusty_bash
v1.3.0
Correction of behavioral differences with Bash
We fixed some differences of output between bash and sush. Followings are major revisions.
- Omitted evaluation of substring expansion for undefined variables
- Behavior of
read- implemented
-t(timeout) option - Fixed some rules toward spaces or escaped spaces
- implemented
See https://github.com/shellgei/rusty_bash_test/blob/v1.3.0/test_fixed.bash for details on the specific corrections.
Full Changelog: v1.2.9...v1.3.0
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