#prompt #sudo #permissions #run-command

sudo_prompt

Provides a dialog prompt to run a command using sudo

1 unstable release

0.1.0 Jan 8, 2023

#711 in Unix APIs

Download history 2/week @ 2024-12-04 10/week @ 2024-12-11 4/week @ 2025-01-15 2/week @ 2025-02-05 25/week @ 2025-02-12 1/week @ 2025-02-19 23/week @ 2025-02-26

51 downloads per month

MIT license

15KB
447 lines

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

Dependencies

~0.9–9.5MB
~106K SLoC