diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-02-20 00:44:21 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-02-20 00:44:21 (EST) |
commit | f98bb90a61b6bf98dfe831777482592ea4147976 (patch) | |
tree | fe0cc32bc56134aa3fc8b79295d9d441a27f5eed | |
parent | 3008e375da980540d5255c34cec3b7d0999f483f (diff) | |
download | eggshell-f98bb90a61b6bf98dfe831777482592ea4147976.zip eggshell-f98bb90a61b6bf98dfe831777482592ea4147976.tar.gz eggshell-f98bb90a61b6bf98dfe831777482592ea4147976.tar.bz2 |
Rearrange command()
-rw-r--r-- | parsing/parse.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/parsing/parse.sh b/parsing/parse.sh index da0b07f..444ccc5 100644 --- a/parsing/parse.sh +++ b/parsing/parse.sh @@ -38,6 +38,7 @@ list() fi return 1 } + and_or() { dbg 'and_or()' @@ -51,6 +52,7 @@ and_or() fi return 1 } + pipeline() { dbg 'pipeline()' @@ -78,13 +80,13 @@ pipe_sequence() command() { dbg 'command()' - if compound_command; then + if simple_command; then + return 0 + elif compound_command; then redirect_list return 0 elif function_defn; then return 0 - elif simple_command; then - return 0 fi return 1 } @@ -441,7 +443,7 @@ try() #try 'foo ${#bar#}' #try 'foo ${^}' #try 'foo `bar`' -try 'foo &&' +#try 'foo &&' #try '{ foo; }' #try '( foo )' #try 'for i in 1 2 3; do stuff; done' |