mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Added: Add UnixShellEnvironment.LOGIN_SHELL_BINARIES
variable for common/supported login shell binaries searched and add fish
and sh
shell as additional backups
This commit is contained in:
@@ -52,6 +52,9 @@ public abstract class UnixShellEnvironment implements IShellEnvironment {
|
||||
public static final String ENV_TMPDIR = "TMPDIR";
|
||||
|
||||
|
||||
/** Names for common/supported login shell binaries. */
|
||||
public static final String[] LOGIN_SHELL_BINARIES = new String[]{"login", "bash", "zsh", "fish", "sh"};
|
||||
|
||||
|
||||
|
||||
@NonNull
|
||||
|
@@ -93,7 +93,7 @@ public class TermuxSession {
|
||||
boolean isLoginShell = false;
|
||||
if (executionCommand.executable == null) {
|
||||
if (!executionCommand.isFailsafe) {
|
||||
for (String shellBinary : new String[]{"login", "bash", "zsh"}) {
|
||||
for (String shellBinary : UnixShellEnvironment.LOGIN_SHELL_BINARIES) {
|
||||
File shellFile = new File(defaultBinPath, shellBinary);
|
||||
if (shellFile.canExecute()) {
|
||||
executionCommand.executable = shellFile.getAbsolutePath();
|
||||
|
Reference in New Issue
Block a user