From: Jan Kryl <jan.kryl@nexenta.com>
To: zsh-workers@zsh.org
Subject: autocompletion is broken in restricted shell
Date: Mon, 8 May 2017 11:38:37 +0200 [thread overview]
Message-ID: <11381B06-E104-4785-8BB7-AC5E5B0296F0@nexenta.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
Hi,
after we updated zsh to 5.3 autocompletion stopped to work for us in restricted
shell. This is mainly due to "38692: IFS can't be changed in restricted mode”.
I suppose there is a good reason why setting IFS is not allowed in restricted mode
even though that it’s not apparent to me.
However at least I would like to fix another thing which breaks autocompletion and
that is using write redirections in autocompletion code. That can be avoided by using
2>&- instead of 2>/dev/null. A patch for review is attached.
thanks
-Jan
[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 536 bytes --]
--- a/Completion/compinit Mon May 8 12:51:31 2017
+++ b/Completion/compinit Mon May 8 12:51:40 2017
@@ -168,7 +168,7 @@
_comp_caller_options=(${(kv)options[@]});
setopt localoptions localtraps localpatterns ${_comp_options[@]};
local IFS=$'\'\ \\t\\r\\n\\0\'';
- builtin enable -p \| \~ \( \? \* \[ \< \^ \# 2>/dev/null;
+ builtin enable -p \| \~ \( \? \* \[ \< \^ \# 2>&-;
exec </dev/null;
trap - ZERR;
local -a reply;
next reply other threads:[~2017-05-08 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170508093906epcas5p35e1b5c235b94e4b754107d42c915e638@epcas5p3.samsung.com>
2017-05-08 9:38 ` Jan Kryl [this message]
2017-05-08 16:48 ` Peter Stephenson
2017-05-08 18:03 ` Bart Schaefer
2017-05-10 5:02 ` Bart Schaefer
2017-05-10 8:48 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11381B06-E104-4785-8BB7-AC5E5B0296F0@nexenta.com \
--to=jan.kryl@nexenta.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).