sudo_prompt

Crates.iosudo_prompt
lib.rssudo_prompt
version0.1.0
sourcesrc
created_at2023-01-08 06:03:27.803426
updated_at2023-01-08 06:03:27.803426
descriptionProvides a dialog prompt to run a command using sudo.
homepage
repositoryhttps://github.com/oyyd/sudo-prompt-rs
max_upload_size
id753496
size20,693
Ouyang Yadong (oyyd)

documentation

README

sudo-prompt-rs

sudo-prompt-rs provides a dialog prompt to run a command using sudo. This is a rewrite of sudo-prompt in Rust.

Mac:

Linux:

Windows: TODO: new images here

Usage

use sudo_prompt::{Opts, SudoPrompt};

fn main() {
  // TODO provide "new" method
  let prompt = SudoPrompt {};
  let resp = prompt.exec(&Opts {
      cmd: r#"env"#.to_string(),
      env: None,
      name: None,
  }).unwrap();
}

TODO: example here

Commit count: 0

cargo fmt