X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWindow.java;h=41c4b5eca784aaa051f7b5566cb6262fd1a8532d;hb=6ba187ac15f387dd7758c10ed1bd90f34bd32892;hp=c0af74bafa12ce9046277f0eab0746c7571bee43;hpb=55d2b2c2b29ce51f4f910448a115073371deeae8;p=fanfix.git diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index c0af74b..41c4b5e 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2016 Kevin Lamonte + * Copyright (C) 2017 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -166,7 +166,7 @@ public class TTerminalWindow extends TWindow { "script", "-fqe", "/dev/null" }; String [] cmdShellBSD = { - "script", "-qe", "-F", "/dev/null" + "script", "-q", "-F", "/dev/null" }; // Spawn a shell and pass its I/O to the other constructor. @@ -200,6 +200,9 @@ public class TTerminalWindow extends TWindow { // Claim the keystrokes the emulator will need. addShortcutKeys(); + + // Add shortcut text + newStatusBar("Terminal session executing..."); } /** @@ -263,6 +266,9 @@ public class TTerminalWindow extends TWindow { // Claim the keystrokes the emulator will need. addShortcutKeys(); + + // Add shortcut text + newStatusBar("Terminal session executing..."); } /** @@ -358,7 +364,8 @@ public class TTerminalWindow extends TWindow { /** * Handle window close. */ - @Override public void onClose() { + @Override + public void onClose() { emulator.close(); if (shell != null) { terminateShellChildProcess(); @@ -406,6 +413,8 @@ public class TTerminalWindow extends TWindow { shell = null; emulator.close(); clearShortcutKeypresses(); + statusBar.setText("Terminal session completed, exit " + + "code " + rc + "."); } catch (IllegalThreadStateException e) { // The emulator thread has exited, but the shell Process // hasn't figured that out yet. Do nothing, we will see @@ -421,6 +430,8 @@ public class TTerminalWindow extends TWindow { shell = null; emulator.close(); clearShortcutKeypresses(); + statusBar.setText("Terminal session completed, exit " + + "code " + rc + "."); } catch (IllegalThreadStateException e) { // The shell is still running, do nothing. }