Crate shell_helper[][src]

Very simple helper functions to make building linux scripts in rust easier



Runs a command using shell (sh, bash, zsh, etc), name is used to make error messages useful, e.g. command("sh", "sudo pacman -Syyu", "update") would panic on Failed to execute update or Failed to wait on update. Returns output as Output


Asks question (inserting a newline at the end) and given options (a vector of tuples (option, function)) will show all options and numbers which have to be typed in in order to choose them. If user types in 0, the function returns


Downloads a file from url and then saves it as name


Installs a package using repo's package manager, e.g. aur would use yay, arch would use pacman, dnf is default. Can give additional arguments. Uses command