Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
dimitriye98

D-Shell [0.2.0]

Recommended Posts

Updated

https://github.com/dimitriye98/OC-DShell

Install with:

wget https://raw.githubusercontent.com/dimitriye98/OC-DShell/master/dsh.lua
New Features:
  • Command mode:

    dsh -c "echo hi" => prints "hi" and exits
  • Comments for shell scripting, just start them with a `#`
  • Builtins! No more executing a whole other program just to do simple stuff like printing text; the following commands are now built into the shell:
    • `:`: nop
    • `source`: evaluates the given file; a proper `./` construct will be added soon
    • `eval`: complete passed command / script
    • `exec`: complete the passed command and exit with the same exit code
    • `echo`: POSIX compliant echo command
    • `exit`: Guess.
Features:
  • Multiple commands in a single line, delimited by semicolons:

    echo hi; echo hello => hihello
  • Short-circuiting and and or operators:
  • In file test.lua:

    error()
       test && echo hello =>
       test || echo hello => hello
    echo hi || echo hello => hi
Coming Soon:
  • Command expansion:

    $(command) or `command`
  • Arithmetic expansion:

    $((expression))
Long-term Goals:
  • Shell scripting
  • POSIX compliance
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.