mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
remove: unneeded function
This commit is contained in:
parent
06f4d449f4
commit
b16dc1dd5b
2 changed files with 1 additions and 11 deletions
|
|
@ -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}}'''
|
||||
|
|
|
|||
10
src/shell.rs
10
src/shell.rs
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue