From ed44ddad22d2b8476ea72cba46c8847d5f082a87 Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Sat, 11 Jan 2014 19:31:29 +0000
Subject: 32246: option "shift -p" pops arguments from end of array
---
Doc/Zsh/builtins.yo | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'Doc/Zsh')
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) ... ])(
--
cgit 1.4.1