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: Fri Oct 18 2024 03:29:38 GMT-0900 (Hawaii-Aleutian Daylight Time)