Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] In allopt, set IFS needed for read
- X-seq: zsh-workers 41839
- From: Sebastian Gniazdowski <psprint@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] In allopt, set IFS needed for read
- Date: Mon, 9 Oct 2017 16:18:17 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
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}}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author