Terminal: Tweak the preferred shell order

Keep things least likely to be terrible at being interactive shells
first ;).
We penalize ZSH a bit, because RPROMPTS aren't really handled by the
plugin, which makes things confusing.
This commit is contained in:
NiLuJe
2024-10-13 03:51:56 +02:00
parent 312c3f0d46
commit 83bc531186

View File

@@ -103,11 +103,11 @@ function Terminal:getDefaultShellExecutable()
local shell = {
"bash",
"sh",
"dash",
"ash",
"sh",
"zsh", -- RPROMPTs aren't really handled well, so we deprioritize it a bit
"dash",
"hush",
"zsh",
"ksh",
"mksh",
}
@@ -201,6 +201,7 @@ function Terminal:spawnShell(cols, rows)
return false
end
logger.info("Terminal: spawning shell", shell)
local pid = C.fork()
if pid < 0 then
logger.err("Terminal: fork failed:", ffi.string(C.strerror(ffi.errno())))