Skip to content

Releases: shellgei/rusty_bash

v0.4.9

11 Jul 00:07
Compare
Choose a tag to compare
  • Implemented ${VAR:-word}, ${VAR:=word}, ${VAR:?word} and ${VAR:+word}.
### :- show a default string if A is not defined. ###
🍣 echo ${A:-not defined}
not defined
### := show a default string and substitute it to A if A is not defined. ###
🍣 echo ${A:=not defined}
not defined
🍣 echo $A
not defined
### :? show a string as an error message if A is not defined. ###
🍣 echo ${A:?not defined}
sush: A: not defined
### :+ show a string if A IS defined. ###
🍣 A= ; echo ${A:+set}

🍣 A=aaa ; echo ${A:+set}
set
  • Fixed a bug at empty string substitution
🍣 A=
🍣 (commands were ignored on the previous versions)

v0.4.7

10 Jul 04:57
Compare
Choose a tag to compare

Implemented unset command.

🍣 A=aaaa
🍣 echo $A
aaaa
🍣 unset A
🍣 echo $A

v0.4.6

08 Jul 12:40
Compare
Choose a tag to compare

Implemented eval.

🍣 eval '(' echo a b c ')' '|' rev
c b a

v0.4.5

08 Jul 11:47
Compare
Choose a tag to compare

Supported changes of the terminal title.

  • example (you can see the title is changed to ueda@uedax1:/etc/libblockdev)

image

  • requirement

You must add \[\033]2;SOMETHING YOU WANT TO DISPLAY\007\] to PS1 in ~/.sushrc . We show a simple example.

PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\b\[\033[00m\]\[\033[01;35m\]\w\[\033[00m\](debug)🍣 ' 
PS1="\[\033]2;\u@\h: \w\007\]$PS1" #Add this line. 

v0.4.4

07 Jul 08:32
Compare
Choose a tag to compare

Implemeted fg command.

  • example:
🍣 while sleep 1 ;do echo abc ;done | rev
cba
cba
^Z             #Ctrl+Z
🍣 jobs
[1]+  Stopped     while sleep 1 ;do echo abc ;done | rev
🍣 fg
while sleep 1 ;do echo abc ;done | rev
cba
cba
cba
^C[1]+  Interrupt     while sleep 1 ;do echo abc ;done | rev

v0.4.0

07 Jul 00:33
Compare
Choose a tag to compare

Implemented followings:

  • Ctrl+Z for sending SIGTSTOP to foreground processes
  • builtin commands: jobs, wait, and bg (roughly)

v0.3.9

28 Jun 08:54
Compare
Choose a tag to compare
  1. Fixed a bug that erases the latest history after an empty command input
  2. Fixed a bug that makes the shell crush when the parent process executes a procedure to its child after the exec of the child.

v0.3.7

24 Jun 09:55
Compare
Choose a tag to compare

for users

  • Enable to use extglob (extended glob patterns)
ueda@uedaP1g6:main🌵~/GIT/rusty_bash/src/elements🍣 ls
array.rs  command.rs  io.rs   pipeline.rs  subscript.rs     subword     word
command   io          job.rs  script.rs    substitution.rs  subword.rs  word.rs
ueda@uedaP1g6:main🌵~/GIT/rusty_bash/src/elements🍣 echo @(sub|pi)*.rs # @( ) is an extended pattern matching operator
pipeline.rs subscript.rs substitution.rs subword.rs
  • Fixed the command completion problem on WSL (issue #93)

Removed search paths whose name starts from /mnt if the Linux environment worked on WSL.

for contributors

The file glob implementation is switched to my original one. You can trace the code from the expand function in https://github.com/shellgei/rusty_bash/blob/main/src/elements/word/path_expansion.rs .

v0.3.6

22 Jun 07:12
Compare
Choose a tag to compare

Made the shell store histories including returns with a simple replacement. All returns in a command line are replaced to "↵ \0" ( ↵ + a space + a null character ). The command ( echo a ↵ echo b ↵ echo c↵ ) in the following figure means

(echo a
echo b
echo c
)

for example.

image

v0.3.5

20 Jun 00:20
Compare
Choose a tag to compare

Enabled to choose command inputs from history by double Tab on empty command line.

image