diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-04-04 12:50:22 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-04-04 12:50:22 +0200 |
commit | b3bd23dd0a5f287bbdfe3ed5b7423a8134417cc4 (patch) | |
tree | 0f2021202825d2b6a2fefacce25ae2c60cb5e823 /doc | |
parent | escape text in description for zsh (diff) | |
download | auto-auto-complete-7.tar.gz auto-auto-complete-7.tar.bz2 auto-auto-complete-7.tar.xz |
add file descriptor redirection7
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/example | 5 | ||||
-rw-r--r-- | doc/syntax | 20 |
2 files changed, 22 insertions, 3 deletions
diff --git a/doc/example b/doc/example index a993b54..d1e6b68 100644 --- a/doc/example +++ b/doc/example @@ -54,11 +54,12 @@ (no-exec ls "'/usr/share/ponysay/balloons'" (case (ponysay .say) (ponythink .think))) ) (suggestion wrap (verbatim none inherit 100 60) - (calc (pipe (stty size) + (calc (pipe (stdin-fd (stty size) (stderr)) (cut -d ' ' -f 2) ) - 10 ) ) - ; in addition to `pipe`(|) to following are also possible `fullpipe`(|&) `cat`(;) `and`(&&) `or`(||) + ; in addition to `pipe`(|) the following are also possible: `fullpipe`(|&) `cat`(;) `and`(&&) `or`(||) + ; in addition to `stdin-fd`(<&) the following are also possible: `stdout-fd` `stderr-fd` `fd-fd` `stdin` `stdout` `stderr` `fd` ) @@ -56,10 +56,28 @@ verbatim ::= 'verbatim' _value [{_ value}] calc ::= 'calc' (__ value | _ any_exec) [{_ value | _ any_exec}] -any_exec ::= '(' _ exec_type (__ value | _ any_exec) [{_ value | _ any_exec}] _ ')' +any_exec ::= '(' _ (exec_sequence | exec_redirect) _ ')' + +exec_sequence ::= exec_type (__ value | _ any_exec) [{_ value | _ any_exec}] exec_type ::= "exec" | "calc" | "pipe" | "fullpipe" | "cat" | "and" | "or" +exec_redirect ::= std_redirect | fd_redirect | std_redirect_fd | fd_redirect_fd + +std_redirect ::= input _ any_exec _ value + +fd_redirect ::= "fd" _ any_exec _ (number _value | fdnum _ value) + +std_redirect_fd ::= input "-fd" _ any_exec _ (number | fdnum) + +fd_redirect_fd ::= "fd" _ any_exec _ (number __ number | (number | fdnum) _ fdnum | fdnum _ number) + +input ::= "stdin" | "stdout" | "stderr" + +fdnum :: = "(" _ input _ ")" + +number ::= {"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"} + name ::= {letter | escape | squote | dquote} letter :: $any ^ ' ' ^ \t ^ \n ^ \r ^ \t ^ '\' ^ \' ^ \" |