From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13855 invoked by alias); 8 May 2017 18:03:12 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41075 Received: (qmail 15006 invoked from network); 8 May 2017 18:03:12 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f170.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.170):SA:0(0.5/5.0):. Processed in 1.236567 secs); 08 May 2017 18:03:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_SPAM,SPF_PASS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.170 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nHEHjnNv7wtPyyzMMkqal10dApr4L73bwhtkVt9hv2A=; b=J0xTaEFsGJDzuxIxdQmOVwcrU+OBFrTDSJGHqIA+8IBRFc8IAPy6pppNCAreiyc0UT MKi87Bw8aSdAJq0r0MvgCRRevo14WVV/+w1zEaiI4M3r0PgryYKyXMIg9ssLV9rjdHPf LXVQwduyBLpYVPAhjk1gzkwMaJrrcVrtfc7UKw3oOvWL2uHe8jt0FMep5ZD7TNiOcLsY R2d3778VJRjDlQ95QxNm9ZfRpCe33x3Bs+jc+pf47vpR86qdX8qGOgD3NRu0W4zDukao d9ZkQnmnNcUJZhGjkbWi9wAe1nHvyKrZkBQGIAS2s9VM4ztMON0hob0Op5KER4goIJBW ZXVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nHEHjnNv7wtPyyzMMkqal10dApr4L73bwhtkVt9hv2A=; b=scNZjGtFXN3ursvKKloLZjhRAyjOtNEl+B2smJ+aoxKWW6XiP/VxTt9D+o1XDXl1UV rBVv6971oQ/THLejvJwkVYalQccHpwEYtDbvnUNAQ8i1g+WVrZjpTVdbrMrnuGCZjINr WAYZaJifhFOE5bwHMyDlm2+HStjr+JsGqRjlwgD57KgrNV44NxQwmmkWfQc3GNOM7W0D beleVqAgAEvKkAfo8RU7kPRxUwc9o81pOxlp8HrjaRcCWOk6atgli0ONerkASJrxbj2t ph3BebrkU12qEpFa5O5F95+MW9aWh0/0oDMFX1we1hhWIGVSUoPa9Yoe9HCL/CaH+LwO 6mHw== X-Gm-Message-State: AODbwcCfl042OkpUI8yotgB05XVRn8ubpWaYMuzkubdwiVh5ePe/9vz8 AcULjXcMODwL0p23XRwNRj/qI+DKmhJR X-Received: by 10.200.36.10 with SMTP id c10mr10355750qtc.160.1494266585873; Mon, 08 May 2017 11:03:05 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20170508174847.6fe6b571@pwslap01u.europe.root.pri> References: <11381B06-E104-4785-8BB7-AC5E5B0296F0@nexenta.com> <20170508174847.6fe6b571@pwslap01u.europe.root.pri> From: Bart Schaefer Date: Mon, 8 May 2017 11:03:05 -0700 Message-ID: Subject: Re: autocompletion is broken in restricted shell To: Peter Stephenson Cc: "zsh-workers@zsh.org" , Jan Kryl Content-Type: text/plain; charset=UTF-8 On Mon, May 8, 2017 at 9:48 AM, Peter Stephenson wrote: > On Mon, 8 May 2017 11:38:37 +0200 > Jan Kryl wrote: >> That can be avoided by using 2>&- instead of 2>/dev/null. > > I'm not sure if you're realistically going to get an error message from > there as long as the shell supports that syntax, so it's probably > reasonable to apply this and see what happens. Although this won't matter 90+% of the time because "enable" rarely emits an error, I think it's going to complain when there IS an error: % () { print -u2 OOPS } 2>&- zsh: write error If you're going to get error output anyway, you might as well drop the 2> and get *useful* error output. However, there are a zillion other places in completion where we redirect stderr to /dev/null, so changing that single one in compinit isn't going to fix the general problem.