Package org.jline.shell
Class PipelineBuilder
java.lang.Object
org.jline.shell.PipelineBuilder
-
Method Summary
Modifier and TypeMethodDescriptionAdds a conditional AND (&&) to the next command.Adds an append redirection (>>) to the specified file.Marks this pipeline for background execution.build()Builds the pipeline.combinedRedirect(Path file) Adds a combined stdout+stderr redirection (&>) to the specified file.Adds a flip pipe (|;) to the next command.inputRedirect(Path file) Adds an input redirection (<) from the specified file.Adds a conditional OR (||) to the next command.Adds a pipe (|) to the next command.Adds an output redirection (>) to the specified file.Adds a sequence separator (;) to the next command.stderrRedirect(Path file) Adds a stderr redirection (2>) to the specified file.
-
Method Details
-
pipe
Adds a pipe (|) to the next command.- Parameters:
command- the next command to pipe to- Returns:
- this builder
-
flip
Adds a flip pipe (|;) to the next command. The output of the previous command is appended as an argument to the next.- Parameters:
command- the next command- Returns:
- this builder
-
and
Adds a conditional AND (&&) to the next command. The next command executes only if the previous succeeded.- Parameters:
command- the next command- Returns:
- this builder
-
or
Adds a conditional OR (||) to the next command. The next command executes only if the previous failed.- Parameters:
command- the next command- Returns:
- this builder
-
sequence
Adds a sequence separator (;) to the next command. The next command executes unconditionally after the previous one.- Parameters:
command- the next command- Returns:
- this builder
-
redirect
Adds an output redirection (>) to the specified file.- Parameters:
file- the file to redirect output to- Returns:
- this builder
-
append
Adds an append redirection (>>) to the specified file.- Parameters:
file- the file to append output to- Returns:
- this builder
-
inputRedirect
Adds an input redirection (<) from the specified file.- Parameters:
file- the file to read input from- Returns:
- this builder
-
stderrRedirect
Adds a stderr redirection (2>) to the specified file.- Parameters:
file- the file to redirect stderr to- Returns:
- this builder
-
combinedRedirect
Adds a combined stdout+stderr redirection (&>) to the specified file.- Parameters:
file- the file to redirect both streams to- Returns:
- this builder
-
background
Marks this pipeline for background execution.- Returns:
- this builder
-
build
-