pretty-please 0.1.0

The polite sudo.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

#[derive(Debug, Error)]
pub enum PleaseError {
    #[error(
        "pls needs a command. Use `pls <command...>` or install a shell hook with `pls init <shell>`."
    )]
    MissingCommand,
    #[error("there's no previous command to rerun yet.")]
    EmptyHistory,
    #[error("couldn't parse the previous command from shell history.")]
    ParseHistory(#[source] shell_words::ParseError),
    #[error("`{0}` is a shell builtin, so sudo can't change your current shell state.")]
    Builtin(String),
    #[error("`sudo` wasn't found on PATH. Install sudo first, or use `doas` directly for now.")]
    MissingSudo,
}