diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-01-11 19:31:29 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-01-11 19:31:29 +0000 |
commit | ed44ddad22d2b8476ea72cba46c8847d5f082a87 (patch) | |
tree | 7e53725a3093cf0ed13b4de0992a393d8b4359b6 /Doc | |
parent | 8fd6d5766c74da73f9a68c97589c58b5292cab24 (diff) | |
download | zsh-ed44ddad22d2b8476ea72cba46c8847d5f082a87.tar.gz zsh-ed44ddad22d2b8476ea72cba46c8847d5f082a87.tar.xz zsh-ed44ddad22d2b8476ea72cba46c8847d5f082a87.zip |
32246: option "shift -p" pops arguments from end of array
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Zsh/builtins.yo | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 8c7bc85ea..ea2f68d10 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -1500,12 +1500,15 @@ POSIX standard, but tt(setopt) is not. ) findex(shift) cindex(parameters, positional) -item(tt(shift) [ var(n) ] [ var(name) ... ])( +item(tt(shift) [ tt(-p) ] [ var(n) ] [ var(name) ... ])( The positional parameters tt(${)var(n)PLUS()1tt(}) ... are renamed to tt($1) ..., where var(n) is an arithmetic expression that defaults to 1. If any var(name)s are given then the arrays with these names are shifted instead of the positional parameters. + +If the option tt(-p) is given arguments are instead removed (popped) +from the end rather than the start of the array. ) findex(source) item(tt(source) var(file) [ var(arg) ... ])( |