RxShell

main

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




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


Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Mon Apr 22 2024 09:55:35 GMT-0900 (Hawaii-Aleutian Daylight Time)