mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
feat: partial nushell support
This commit is contained in:
parent
48062142c6
commit
86ae6a6fb4
3 changed files with 16 additions and 1 deletions
|
|
@ -19,6 +19,15 @@ pub fn handle_args() {
|
|||
last_command = "$(history | head -n 1)";
|
||||
alias = "$(alias)";
|
||||
}
|
||||
"nu" | "nush" | "nushell"=> {
|
||||
last_command = "(history | last).command";
|
||||
alias = "\"\"";
|
||||
println!("with-env {{ _PR_LAST_COMMAND : {},\
|
||||
_PR_ALIAS : {},\
|
||||
_PR_SHELL : {} }} \
|
||||
{{ {} }}", last_command, alias, "nu", binary_path);
|
||||
std::process::exit(0);
|
||||
}
|
||||
_ => {
|
||||
println!("Unknown shell: {}", shell);
|
||||
std::process::exit(1);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ fn last_command(shell: &str) -> String {
|
|||
}
|
||||
"zsh" => last_command,
|
||||
"fish" => last_command,
|
||||
"nu" => last_command,
|
||||
_ => {
|
||||
eprintln!("Unsupported shell: {}", shell);
|
||||
exit(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue