Skip to content

Convert REDIRECTION_CHARS to REDIRECTION_TOKENS #392

@kotfu

Description

@kotfu

Currently we look at REDIRECTION_CHARS in many places in the code: parsing, tab completion, etc. REDIRECTION_CHARS is a constant and is set to ['>', '|'. When we use this constant, we have to do additional code to make sure that we catch >> as a valid redirection, but not ||.

We should really convert REDIRECTION_CHARS into a constant called REDIRECTION_TOKENS, which would be set to ['>', '>>', '|']. This would force code that uses this constant to be generalized so that if we change the constant, the code still works.

Related to #381.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions