Releases: shellgei/rusty_bash
Releases Β· shellgei/rusty_bash
v0.10.2
v0.10.0
Supported <<<
(here string)
Here you are.
π£ rev <<< 123
321
π£ rev <<< $(seq 100 103)
001
101
201
301
π£ seq 100 | rev <<< $(seq 100 103) | tac
301
201
101
001
v0.9.10
Fixed a serious bug on alias
Aliases have been wrongly applied to args of a command on v0.9.9 or before.
### <= v0.9.9 ###
π£ echo ll
ls --color=auto -al
### v0.9.10 ###
π£ echo ll
ll
v0.9.9
Supported complete -c
You can use command completion for the commands listed after complete -c
. Here is an example.
π£ complete -c sudo which
π£ sudo pas
passwd paste #<---candidates for completion
π£ which find
find findfs findhyph findmnt findrule #<---candidates for completion
You can use ~/.sushrc
to write complete -c ...
for initialization.
v0.9.7
Enabled to use associative arrays
like this:
π£ declare -A X
π£ X[abc]=123
π£ X[def]=456
π£ echo ${X[def]}
456
π£ echo ${X[@]}
123 456
π£ Y=abc
π£ echo ${X[$Y]}
123
Enjoy!
v0.9.4
Implemented continue command
Like this:
### skip "echo NG" after the continue command ###
π£ seq 2 | while read d ; do echo x; continue; echo NG ; done
x
x
### skip the outer loop with continue <num> ###
π£ seq 2 | while read d ; do for a in a b ; do echo x; continue 2 ; done ; echo NG ; done
x
x
v0.9.2
Implemented some features
SECONDS, EPOCHSECONDS, EPOCHREALTIME
These variables are implemented by @t-koba .
- SECONDS: time elapsed from the shell starts
- EPOCHSECONDS: unixtime
- EPOCHREALTIME: unixtime with microsecond
π£ echo $SECONDS, $EPOCHSECONDS, $EPOCHREALTIME
2161, 1732101153, 1732101153.551434
enabled to use [0-9], [a-z], and [A-Z] in glob patterns
These wildcards are omitted in previous implementations.
π£ ls
Cargo.lock Cargo.toml LICENSE README.md RELEASE.md build.rs src target test
π£ ls [A-D]*
Cargo.lock Cargo.toml
π£ ls -d [!A-D]*
LICENSE README.md RELEASE.md build.rs src target test
v0.9.0
Fixed bugs on shell script execution
- In the previous implemetation, we have used fd0 for reading shell scripts. This crude implementation has made fd0 unusable for reading data and has been the reasons of some errors.
core.tty_fd
, which was duplicated from fd2, doesn't point tty if fd2 of a shell script was redirected to a file. This was a cause of bugs when a command is forked from the shell script. Socore.tty_fd
is duplicated from fd0 in this version.
v0.8.11
Fixed bugs
- Fixed no reaction toward an index designation on referring a special parameter
### before ###
π£ echo ${@[1]}
π£ echo $?
0
### after ###
π£ echo ${@[1]}
sush: ${@[1]}: bad substitution
π£ echo $?
1
- Fixed wrong word splitting on
$@ and $ {array[@]} in a double quoted subword
### before ###
π£ set a b c ; for x in "@$@x" ; do echo $x ; done
@a
b
### after ###
π£ set a b c ; for x in "@$@x" ; do echo $x ; done
@a
b
cx
v0.8.10
Supported ${name/pattern/word}, ${name//pattern/word}, ${name/#pattern/word}, and ${name/%pattern/word}
Here are the examples:
π£ echo $BASH_VERSION
0.8.10(rusty_bash)-release
### replace once ###
π£ echo ${BASH_VERSION/0/X}
X.8.10(rusty_bash)-release
### replace all ###
π£ echo ${BASH_VERSION//0/X}
X.8.1X(rusty_bash)-release
### head only replace ###
π£ echo ${BASH_VERSION/#0*8/X}
X.10(rusty_bash)-release
π£ echo ${BASH_VERSION/#release/X}
0.8.10(rusty_bash)-release
### tail only replace ###
π£ echo ${BASH_VERSION/%release/X}
0.8.10(rusty_bash)-X
π£ echo ${BASH_VERSION/%0/X}
0.8.10(rusty_bash)-release