Interface PosixCommands.CommandExecutor

Enclosing class:
PosixCommands

public static interface PosixCommands.CommandExecutor
Interface for executing shell commands in watch.

This interface allows the watch command to execute commands using different execution strategies. Implementations can provide shell integration, process execution, or other command execution mechanisms.

Example implementation for shell integration:


 CommandExecutor executor = command -> {
     Object result = session.execute(String.join(" ", command));
     return result != null ? result.toString() : "";
 };