CmST0us / RxShell

Launch bash shell in Reactive way, and also provide DSL Interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool




RxShell: Use Swift Play with Shell in Reactive X Way

Key FeaturesHow To UseRelatedLicense

Key Features

  • All write in Swift
  • Run shell in Reactive X way
  • DSL Interface for create shell command
  • Custom Pipe
  • Custom Enviroment
  • Macro Support

How To Use

let enviroment = [
    "HELLOWORLD_STR": "Hello Bash"
]

Shells(verbose: true, environment: enviroment) {
    Commands {
        Shell.removeDirectoryIfExist("/tmp/tmp_file")
        Command("touch /tmp/tmp_file")
    }
    Command("echo $HELLOWORLD_STR > /tmp/tmp_file")
    Commands {
        "cat /tmp/tmp_file"
    }
}.action.subscribe().dispose()

Verbose

If you don't want RxShell Output shell command result, you can just set verbose to false

Shells(verbose: false) {
    // Commands
}

Related

Thanks:

License

MIT License


About

Launch bash shell in Reactive way, and also provide DSL Interface

License:MIT License


Languages

Language:Swift 100.0%