Enum Class Pipeline.Operator

java.lang.Object
java.lang.Enum<Pipeline.Operator>
org.jline.shell.Pipeline.Operator
All Implemented Interfaces:
Serializable, Comparable<Pipeline.Operator>, Constable
Enclosing interface:
Pipeline

public static enum Pipeline.Operator extends Enum<Pipeline.Operator>
Operators that connect commands in a pipeline.
  • Enum Constant Details

    • PIPE

      public static final Pipeline.Operator PIPE
      Standard pipe: sends output of left command to right command (|)
    • FLIP

      public static final Pipeline.Operator FLIP
      Flip pipe: appends output as argument to next command (|;)
    • AND

      public static final Pipeline.Operator AND
      Logical AND: execute next command only if previous succeeded (&&)
    • OR

      public static final Pipeline.Operator OR
      Logical OR: execute next command only if previous failed (||)
    • REDIRECT

      public static final Pipeline.Operator REDIRECT
      Output redirection: write output to file (>)
    • APPEND

      public static final Pipeline.Operator APPEND
      Append redirection: append output to file (>>)
    • INPUT_REDIRECT

      public static final Pipeline.Operator INPUT_REDIRECT
      Input redirection: read stdin from file (<)
    • HEREDOC

      public static final Pipeline.Operator HEREDOC
      Here-document: provide stdin inline (<<)
    • STDERR_REDIRECT

      public static final Pipeline.Operator STDERR_REDIRECT
      Stderr redirection: redirect stderr to file (2>)
    • COMBINED_REDIRECT

      public static final Pipeline.Operator COMBINED_REDIRECT
      Combined redirection: redirect both stdout and stderr to file (&>)
    • SEQUENCE

      public static final Pipeline.Operator SEQUENCE
      Sequence: execute next command unconditionally (;)
  • Method Details

    • values

      public static Pipeline.Operator[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Pipeline.Operator valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • symbol

      public String symbol()
      Returns the string symbol for this operator.
      Returns:
      the operator symbol
    • fromSymbol

      public static Pipeline.Operator fromSymbol(String symbol)
      Returns the operator matching the given symbol, or null if none matches.
      Parameters:
      symbol - the symbol to look up
      Returns:
      the matching operator, or null