You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added: Add support for waiting for foreground session commands
Previously configured actions will behave the same, i.e wait for only background commands. For new or edited actions, the `Wait for result for commands` toggle value will be used to decide whether to wait for result of commands. It will apply to both foreground session and background commands.
Note that for foreground commands, only the session transcript is returned which will contain both `stdout` and `stderr` combined in `%stdout` variable, basically anything sent to the the pseudo terminal `/dev/pts`, including `PS1` prefixes for interactive sessions.
For foreground commands that exited with failure will require `termux-app` version `>=0.118` for sessions to automatically close without waiting for user to press enter as per termux/termux-app@162a430b.
Closes#39
relevantVariableList.add(PluginUtils.PLUGIN_VARIABLE_STDOUT + "\nStandard Output\nThe <B>stdout</B> of the command.");
214
+
relevantVariableList.add(PluginUtils.PLUGIN_VARIABLE_STDOUT_ORIGINAL_LENGTH + "\nStandard Output Original Length\nThe original length of <B>stdout</B>.");
215
+
216
+
// For foreground commands, the session transcript is returned which will contain
217
+
// both stdout and stderr combined, basically anything sent to the the pseudo
218
+
// terminal /dev/pts, including PS1 prefixes for interactive sessions.
219
+
if (!inTerminal) {
220
+
relevantVariableList.add(PluginUtils.PLUGIN_VARIABLE_STDERR + "\nStandard Error\nThe <B>stderr</B> of the command.");
221
+
relevantVariableList.add(PluginUtils.PLUGIN_VARIABLE_STDERR_ORIGINAL_LENGTH + "\nStandard Error Original Length\nThe original length of <B>stderr</B>.");
222
+
}
223
+
224
+
relevantVariableList.add(PluginUtils.PLUGIN_VARIABLE_EXIT_CODE + "\nExit Code\nThe <B>exit code</B> of the command." +
225
+
"0 often means success and anything else is usually a failure of some sort.");
226
+
209
227
if (TaskerPlugin.hostSupportsRelevantVariables(getIntent().getExtras())) {
0 commit comments