allow passing pipeline on stdin
This commit is contained in:
parent
b7e7ab2336
commit
bd43832eee
|
@ -30,6 +30,9 @@ def split_commands(tokens):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
command = sys.argv[1] if len(sys.argv) > 1 else INPUTCMD
|
command = sys.argv[1] if len(sys.argv) > 1 else INPUTCMD
|
||||||
|
if command.strip() == "-":
|
||||||
|
command = sys.stdin.read()
|
||||||
|
|
||||||
oneliner = shlex.shlex(command, posix=True, punctuation_chars=True)
|
oneliner = shlex.shlex(command, posix=True, punctuation_chars=True)
|
||||||
stages = []
|
stages = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue