-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
646 additions
and
369 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ pub mod load; | |
pub mod make; | ||
pub mod resource; | ||
pub mod src; | ||
pub mod update; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,10 @@ | ||
use crate::utils::{config::ShellSpecificEvaluatable, shells::SupportedShell}; | ||
use crate::utils::{ | ||
config::ShellSpecificEvaluatable, evaluatable::process_evaluatable, shells::SupportedShell, | ||
}; | ||
|
||
pub fn load( | ||
current_shell: &SupportedShell, | ||
load_cmd: &ShellSpecificEvaluatable, | ||
load_evaluatable: &ShellSpecificEvaluatable, | ||
) -> Result<(), Box<dyn std::error::Error>> { | ||
Ok(match load_cmd { | ||
ShellSpecificEvaluatable::Generic(generic) => println!("{}", generic), | ||
ShellSpecificEvaluatable::ShellSpecific(shell_specific) => { | ||
let shell_specific_evaluatable = match current_shell { | ||
SupportedShell::Sh => &shell_specific.sh, | ||
SupportedShell::Bash => &shell_specific.bash, | ||
SupportedShell::Zsh => &shell_specific.zsh, | ||
SupportedShell::Fish => &shell_specific.fish, | ||
SupportedShell::PowerShell => &shell_specific.powershell, | ||
SupportedShell::WinCmd => &shell_specific.wincmd, | ||
}; | ||
|
||
match shell_specific_evaluatable { | ||
Some(evaluatable) => println!("{}", evaluatable), | ||
None => (), | ||
} | ||
} | ||
}) | ||
process_evaluatable(current_shell, load_evaluatable) | ||
} |
Oops, something went wrong.