Crate btl[][src]

Macros

cd

The cd macro changes the directory of the current rust process. This does not work for shell or any of the other macros. Only works as a helper macro to make it easier to use cd inside rust. You can still use all normal commands, including cd inside all macros. They don’t change the rust’s process directory. That’s this macro’s purpose.

detach

This is equivalent to shell in syntax and in execution. The difference is that this shell process is completely separated from the rust process and can outlive the rust process.
This is exceptionally useful for creating programs which outlive the main process.

detailed_exec

It’s the same as all macros, but it returns a std::process::Output If you do not understand the syntax of this macro, please read the docs from shell!{} as it provides the same interface but has different purposes.

exec

It’s the same as all macros, but it returns a bool indicating if the command succeded. If you do not understand the syntax of this macro, please read the docs from shell!{} as it provides the same interface but has different purposes.

execute

It’s the same as all macros, but it returns the stdout as a String. This is useful for getting information from cli tools back to rust ergonomically. If you do not understand the syntax of this macro, please read the docs from shell!{} as it provides the same interface but has different purposes.

pwd

The pwd macro gives back the current working directory. Nothing fancy.

shell

The shell!{} macro allows for easy integration of the shell for rust. It is designed to be ergonomic, easy to use and understand. All other macros are based of this macro’s syntax since it’s easy to use, and easy to customize.