remove: unneeded function

This commit is contained in:
iff 2023-07-31 10:26:31 +02:00
parent 06f4d449f4
commit b16dc1dd5b
2 changed files with 1 additions and 11 deletions

View file

@ -50,7 +50,7 @@ pattern = [
]
# this will add a `sudo` before the command if:
# - the `sudo` is found by `which`
# - the command last command does not contain `sudo`
# - the last command does not contain `sudo`
suggest = '''
#[executable(sudo), !cmd_contains(sudo)]
sudo {{command}}'''

View file

@ -74,13 +74,3 @@ fn shell_default_history_file(shell: &str) -> String {
let file = shell_file_map.get(shell).expect("Unsupported shell.");
format!("{}/{}", std::env::var("HOME").unwrap(), file)
}
pub fn get_privilege() -> Option<String> {
for command in PRIVILEGE_LIST {
let command = command.trim();
if std::process::Command::new(command).output().is_ok() {
return Some(command.to_string());
}
}
None
}