1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 05:00:59 +01:00

Richard Hartmann: 26550: document unchangeable options better

This commit is contained in:
Peter Stephenson 2009-02-11 17:57:56 +00:00
parent 76f05a9932
commit f2dd38acc1
3 changed files with 24 additions and 9 deletions

View file

@ -1,5 +1,8 @@
2009-02-11 Peter Stephenson <pws@csr.com>
* Richard Hartmann: 26550: Doc/Zsh/options.yo: make
it clear that various options can't be changed within the shell.
* Frank Terbeck: 26549: Doc/Zsh/contrib.yo,
Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr,
Functions/VCS_Info/Backends/VCS_INFO_get_data_cdv,
@ -11148,5 +11151,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4560 $
* $Revision: 1.4561 $
*****************************************************

View file

@ -1837,7 +1837,8 @@ the standard input is a tty and commands are being read from standard input.
(See the discussion of tt(SHIN_STDIN).)
This heuristic may be overridden by specifying a state for this option
on the command line.
The value of this option cannot be changed anywhere other than the command line.
The value of this option can only be changed with command line parameters.
It cannot be changed once zsh is running.
)
pindex(LOGIN)
pindex(NO_LOGIN)
@ -1891,8 +1892,8 @@ Note that setting or unsetting this option on the command line does not
necessarily affect the state the option will have while the shell is
running - that is purely an indicator of whether on not commands are
em(actually) being read from standard input.
The value of this option cannot be changed anywhere other
than the command line.
The value of this option can only be changed with command line parameters.
It cannot be changed once zsh is running.
)
pindex(SINGLE_COMMAND)
pindex(NO_SINGLE_COMMAND)
@ -1904,7 +1905,8 @@ item(tt(SINGLE_COMMAND) (tt(-t), ksh: tt(-t)))(
If the shell is reading from standard input, it exits after a single command
has been executed. This also makes the shell non-interactive, unless the
tt(INTERACTIVE) option is explicitly set on the command line.
The value of this option cannot be changed anywhere other than the command line.
The value of this option can only be changed with command line parameters.
It cannot be changed once zsh is running.
)
enditem()

View file

@ -33,19 +33,29 @@ zmodload -i zsh/parameter
autoload -U calendar_scandate
local -a vals
local -a vals tmp
[[ -e $REPLY ]] || return 1
zstat -A vals +mtime $REPLY || return 1
if (( $# >= 1 )); then
if [[ $1 = :* ]]; then
zstat -A tmp -F "%Y/%m/%d" +mtime ${1[2,-1]} || return 1
local AGEREF=$tmp[1]
else
local AGEREF=$1
fi
# if 1 argument given, never use globally defined AGEREF2
if [[ $2 = :* ]]; then
zstat -A tmp -F "%Y/%m/%d" +mtime ${2[2,-1]} || return 1
local AGEREF2=$tmp[1]
else
local AGEREF2=$2
fi
fi
integer mtime=$vals[1] date1 date2
local REPLY
local REPLY REPLY2
# allow a time only (meaning today)
if calendar_scandate -t $AGEREF; then