mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
BREAKING: use environments to get informations
This commit is contained in:
parent
ee7e6886b9
commit
1b7b11bd3f
6 changed files with 128 additions and 67 deletions
|
|
@ -1,12 +1,16 @@
|
|||
mod args;
|
||||
mod corrections;
|
||||
mod shell;
|
||||
mod style;
|
||||
|
||||
fn main() {
|
||||
std::env::set_var("LC_ALL", "C");
|
||||
args::handle_args();
|
||||
|
||||
let shell = shell::find_shell();
|
||||
let last_command = shell::find_last_command(&shell);
|
||||
let shell = std::env::var("_PR_SHELL").expect(
|
||||
"No _PR_SHELL in environment. Did you aliased the binary with the correct arguments?",
|
||||
);
|
||||
let last_command = shell::last_command_expanded_alias(&shell);
|
||||
let corrected_command = corrections::correct_command(&shell, &last_command);
|
||||
|
||||
if let Some(corrected_command) = corrected_command {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue