Skip to main content

split_bash

Function split_bash 

Source
pub fn split_bash(input: &str) -> Option<Vec<SplitCommand>>
Expand description

Split a shell command line on &&, ||, ;, |. Quotes and backslash escapes are honored. Returns None on unbalanced quotes.

The last command always has separator = None — operators join a command to the next one, so there is no operator after the final command.