From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14822 invoked from network); 21 Jan 2021 21:59:32 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Jan 2021 21:59:32 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1611266372; b=1cWJvvTkOI2mm50nOHrAstEjUx1URj8bZANaFUlO0OQqwTUUpQXvsB5fMsNgDJXEntBcxXbOo8 mCsxNS0lsKxYg0ncBI9rKQga5/UU4JNnoYN8ltKImSzRCYfPx9ZSNbbWvRGtKmQsrdj9VOsprr FXuUlcsNpSrmfSm9SMV9zZWcca/vyWvmqi7OupI6nynIsL7AY2NbQSLdimqvO7dY8CRam2VAJN Z2Nuu1cOQn9cezQXgo6afZ0US0nKM3hWZlfKTTtZFlY3KgqliVNi7waRN5sKdB7/GzCiv5t2k4 FgW4hCCKaBp4O5qp+qlyx5R7aKPvzt1wpnoBXGYpUCb0OA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oo1-f44.google.com) smtp.remote-ip=209.85.161.44; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1611266372; bh=L64dkHJJ0Jbg2JNVG/wTUDy4Ve+XC4vU81/agIHE8Lk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=iYlEHJ9rYrD38yOFPXk18GCqF55VkV4NLogt9gGNZiWUJuYYiZf1iQSzmrZmNUufoQXVyCds2H Xl4M0zHvLoARyR9bOa9fs4edD5dfAnuPzdgu/A0ZXZqWPoDU/bMAOVH8nJc0nwXXiopibT07kC cKl+FQcUcpAXv6Crgb5Y6fAXAmyrkMlUiFU4kNcTa93V+bnEfCCiCW2yWMYQCs1Q8xO+aU5PJv aiSAMiMw6zUuxsnYKL5lOwjomzgofPcKgrcXu/IISoI0ePBQmShOPW+lJW5HvsJ9z0/9yJGiXr nWB2lviWGMnUfyQw8Vz2P0uREgIHBjabBNn4UIGAu0MawA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=nNr6Kvj3Tb0xubZkn5sDm+nMvoToPUAI0yiq0kkh0tU=; b=CdDOHOUrlXRRmBfReVE6LsGvUw gas5EWhflc+fteaKyJG6V2UYRfakvv3W/TnGonvbDh6fkHDAYqXHOzei340R2bB+kpHtYqUQ7vWhx yhMvRDNIuj529HPyteoaGNd3ApbOxXZys7A6maQqq+voYTXR5gkXBTYDFMhHOLSGmliubZ7l6uQqy sqZjayYBL7QWjxyV3p1iM6PmVJx9J0a/SaCATkiKDLsUUC1ZOdo+O+UM9iKhdvNLEAXPfoyx7QP+a h0B/3DQI1oNqoOn76eyHxkqW1erGo4Y05tHwoAg0boMyvk6l5sdUzL54nTCM5nXxgom8MGDNtTtUY b6r3w+jQ==; Received: from authenticated user by zero.zsh.org with local id 1l2hzG-000CmL-Ki; Thu, 21 Jan 2021 21:59:30 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oo1-f44.google.com) smtp.remote-ip=209.85.161.44; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oo1-f44.google.com ([209.85.161.44]:43891) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1l2hz4-000CdK-GR; Thu, 21 Jan 2021 21:59:19 +0000 Received: by mail-oo1-f44.google.com with SMTP id y14so915148oom.10 for ; Thu, 21 Jan 2021 13:59:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nNr6Kvj3Tb0xubZkn5sDm+nMvoToPUAI0yiq0kkh0tU=; b=Ps3Ls8NAhIRQSsWapydA48z0o92VUCRa8yOQy9kOqKTWnuojToiIVh7plC/TM3uEPy ++nBlR9nh3B0ESp1PyOSZOwHnyuZOKnfcX87SGHaPQn+Dmics7+RoSJwuF28Qs+VJNal c0hJWyMOe4Ciyzxrzmgobor3r7szYo9H0NYYepJHHqbl33jlFHoA+ip+7g7yEpVGIeim cXNPcWA/aJ9doWjkQC2jD9WXTOuIgjnyjP6Gn3JkjrEtol6QGtRV8yFhGJaECURlQy1L sjF2hjiPrp0s6I5moeq0TQtugO+gjuE2vwqKtenGMsfHZTmP3k+x2wMeGSKZ+jYHpe4Y kr7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nNr6Kvj3Tb0xubZkn5sDm+nMvoToPUAI0yiq0kkh0tU=; b=Jp7ECd6IIPxIJCkBUgazENKHOEU8xEaRFxbDxNFE/Q8+au/0urcFblpsccAQHrm67H 8lcO5aVHFlXiNVm4RX9udxIdgRy0aT49rqONtl03hklb6GDjxdmXyugXqI8Fbb+nmn30 ekooZvtBVlpmlx9fJi29j2cGyieIL6O4B+KJoR8h27/o2wkW2XDAAi20Yqes90eyQoch WXxlm58rYOFCHGpYtlOkAmdZIXJR5MbKfJdCS0sAuuLCsrvVHlu+0uJtBfU6+nPDazwB SDLP+p+pfVRoZ78wKlChCG6i+rMFLMznX9dTkC5/YmV58lsDxyKlbSwMiA3SXV7RCeiZ lzmg== X-Gm-Message-State: AOAM5339z0Op1XbFcGeMdIVHX+xkEyEzsOznVRfWT5cK3mCNz8FRyLAD NncU8lb090NOUpKOUG53Loj8rT6x8nZJkHe+dlVQ/FKLYQI= X-Google-Smtp-Source: ABdhPJyU27sqpwuRYUUodPth67QbW9UQsN0kcoMtfzWzaD+OA98dOJpLQt8fdh8Q3+qq2Yf7nUcGUze9n9qSy2CuWus= X-Received: by 2002:a4a:520f:: with SMTP id d15mr1383707oob.29.1611266357288; Thu, 21 Jan 2021 13:59:17 -0800 (PST) MIME-Version: 1.0 References: <91910-1611265666.544073@yljT.3NHd.u6Oz> In-Reply-To: <91910-1611265666.544073@yljT.3NHd.u6Oz> From: Bart Schaefer Date: Thu, 21 Jan 2021 13:59:06 -0800 Message-ID: Subject: Re: compinit in emulation To: Oliver Kiddle Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47860 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Thu, Jan 21, 2021 at 1:47 PM Oliver Kiddle wrote: > > Bart Schaefer wrote: > > The documentation says: > > If the parameter _compdir is set, compinit uses it as a directory where > > completion functions can be found; this is only necessary if they are > > not already in the function search path. > > I'm not entirely clear what that feature is trying to achieve. So you > can wipe out $fpath but set _compdir to the location of the completon > functions and compinit will kindly fill out $fpath with all the > completion directories again. Well, no. _compdir is used in compaudit, and it appends to fpath rather than replaces it. So that whole paragraph in the doc is wrong if "compinit -C" is used. > > However, this depends on the fpath/FPATH tied variable linkage, which > > is disabled when not in native zsh mode. I wrongly expected 'emulate > > -R zsh' to fix this, and spent quite a while down a rabbit hole trying > > to figure out what was wrong. > > I get "compinit:141: parse error: condition expected: $1" when trying to > use the feature from sh emulation - is that what you're referring to? No; compaudit only appends to the fpath array, so FPATH is never updated, so all the work compaudit does searching in $_compdir is useless. I avoided the parse error by using { emulate zsh -c 'autoload compinit' } and things still fail because fpath is not tied to FPATH.