Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

bug in single_command



Quoting Doc/Zsh/options.yo for single_command:

The value of this option cannot be changed anywhere other than the command line.
My personal interpretation is that I can

  setopt single_command

which is obviously not correct. The -t command line switch works as
expected. Thus I suggest the attached patch.
Also, wouldn't it make sense to move errors into dosetopt() so the error
messages could be more explicit about _why_ a setopt went wrong?


Richard

From 8eb5a7a88d94bffb3a5810f9a80e7d76d5f9d3a1 Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih@xxxxxxxxxxxxx>
Date: Wed, 11 Feb 2009 18:45:16 +0100
Subject: [PATCH] Make explanation of 'permanent' options explicit

---
 Doc/Zsh/options.yo |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 2cd02bf..b5ce813 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -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()

-- 
1.5.6.5
From 8eb5a7a88d94bffb3a5810f9a80e7d76d5f9d3a1 Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih@xxxxxxxxxxxxx>
Date: Wed, 11 Feb 2009 18:45:16 +0100
Subject: [PATCH] Make explanation of 'permanent' options explicit

---
 Doc/Zsh/options.yo |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 2cd02bf..b5ce813 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -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()
 
-- 
1.5.6.5



Messages sorted by: Reverse Date, Date, Thread, Author