Skip to content

Commit

Permalink
Improved readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed Oct 18, 2019
1 parent 90a4b75 commit ba08a2c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# cash
A Bourne-compatible shell for ComputerCraft. WIP.
A Bourne-compatible shell for ComputerCraft.

![image](image.png)

## Features
* Bash/sh-style command line
* Tab completion (defaulting to file names where not supported)
* Customizable prompts (including ANSI support)
* Local & environment variables
* Argument quoting
* Multiple commands on one line with semicolons
* Many built-in functions (including in-line Lua commands)
* Arithmetic expansion
* If, while, for statements
* Function support
* Shell scripting/shebangs
* rc files
* Restorable history
* Partial CCKernel2 support
* Full compatibility with CraftOS shell.lua

### TODO
* Add case statement
* Add case statement
* Fix environment variables in _ENV
3 changes: 2 additions & 1 deletion cash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ end

if args[1] ~= nil then
local path = table.remove(args, 1)
local file = io.open(shell.resolve(path), "r")
path = fs.exists(path) and path or shell.resolve(path)
local file = io.open(path, "r")
for line in file:lines() do shell.run(line) end
file:close()
return
Expand Down
Binary file added image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ba08a2c

Please sign in to comment.