From 702556a30f7727d6ce8e40e199c2927cbe28e5c8 Mon Sep 17 00:00:00 2001 From: fallwith Date: Sat, 22 Jan 2022 01:33:44 -0800 Subject: [PATCH] Add support for mksh `frum init` produces an error about not being able to infer the shell when ran under mksh. From looking at frum's source and documentation, the `__frumcd` shell function and the `eval` and `frum init` commands for bash all seem like they will work just fine with mksh. I added mksh alongside bash and sh and rebuilt frum and everything is working well for me. I do not currently have access to other ksh derivatives to test with, and I am not sure of the current state of ksh derivative support in the "shell" crate. But this simple change has me up and running and enjoying frum. --- src/shell/infer/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/infer/unix.rs b/src/shell/infer/unix.rs index 0979b1e7..a606dc49 100644 --- a/src/shell/infer/unix.rs +++ b/src/shell/infer/unix.rs @@ -26,7 +26,7 @@ pub fn infer_shell() -> Option> { .expect("Can't read file name of process tree"); match binary { - "sh" | "bash" => return Some(Box::from(Bash)), + "sh" | "bash" | "mksh" => return Some(Box::from(Bash)), "zsh" => return Some(Box::from(Zsh)), "fish" => return Some(Box::from(Fish)), "pwsh" => return Some(Box::from(PowerShell)),