Crate shell_helper[][src]

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

Functions

command

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

dialog

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

install

Installs a package using pacman or yaourt, pacman is default. Uses --noconfirm --needed by default, can give additional arguments. Uses command