From 83bc531186c6438fe70fe9e6ea0486e453e8ed72 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Sun, 13 Oct 2024 03:51:56 +0200 Subject: [PATCH] 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. --- plugins/terminal.koplugin/main.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/terminal.koplugin/main.lua b/plugins/terminal.koplugin/main.lua index 4b1dcbcac..26ccba0d5 100644 --- a/plugins/terminal.koplugin/main.lua +++ b/plugins/terminal.koplugin/main.lua @@ -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())))