zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] In allopt, set IFS needed for read
@ 2017-10-09 14:18 Sebastian Gniazdowski
  0 siblings, 0 replies; only message in thread
From: Sebastian Gniazdowski @ 2017-10-09 14:18 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

Hello,
I use allopt to compare environments when something doesn't work. Once, allopt itself turned out to not work. The cause was changed IFS. The patch does "local IFS=$' \t\n'" in function using `read' to solve this.

-- 
Sebastian Gniazdowski
psprint /at/ zdharma.org

[-- Attachment #2: allopt.diff.txt --]
[-- Type: text/plain, Size: 484 bytes --]

diff --git a/Functions/Misc/allopt b/Functions/Misc/allopt
index 0c521f3..5d5d288 100644
--- a/Functions/Misc/allopt
+++ b/Functions/Misc/allopt
@@ -8,7 +8,7 @@
 # Written by Sweth Chandramouli with hacks by Bart Schaefer.

 listalloptions () {
-   local OPT_NAME OPT_VALUE
+   local OPT_NAME OPT_VALUE IFS=$' \t\n'
    builtin set -o | while read OPT_NAME OPT_VALUE ; do
       if [[ ${OPT_NAME#no} != ${OPT_NAME} ]] ; then
         OPT_VALUE=${(L)${${OPT_VALUE:s/on/OFF}:s/off/on}}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-09 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09 14:18 [PATCH] In allopt, set IFS needed for read Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).