From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-users-return-23731-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 92bdf2ef for ; Fri, 26 Oct 2018 18:50:34 +0000 (UTC) Received: (qmail 8069 invoked by alias); 26 Oct 2018 18:50:18 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23731 Received: (qmail 7522 invoked by uid 1010); 26 Oct 2018 18:50:18 -0000 X-Qmail-Scanner-Diagnostics: from mail-it1-f175.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.166.175):SA:0(-1.9/5.0):. Processed in 1.855187 secs); 26 Oct 2018 18:50:18 -0000 X-Envelope-From: julien.nicoulaud@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ld86664+Qk5zfd/1oTd+PC6l3bsXeA6JAznaK4fGx50=; b=vOpB3nDhIxpfC5FH6O3X1HRx6E3RTf2PVFyjZbtTgVjgMUt2wKeMtvYZXMppSnCSnO ZwCYuB9SCCoHlFHKuy/hg/eomxPZd6i/mhuIWrYb+/wLL5F6V0PsqSUaZGNml8TPRni0 CqFMyI2E6PETQ2JUGOiTHys2tGF6bxG5jFnQ/QLdsksxpe2/6MqXwmeIf4bQuTP+Tayb qJk+46ZZbXL5Gt7UsdKFllOFouWSOCs5OynrNa3OD8Cevy/u6qJr4/4AG2Co7xPQaakW jRrVrx2MbOIypz09ukiQOwrUs/95Xsl79dmoC9DbbvBuAakL1HULhwJzPMuH+qklqh64 y+WA== 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=Ld86664+Qk5zfd/1oTd+PC6l3bsXeA6JAznaK4fGx50=; b=oXEmkII+B4ncWlhYat3tQgOo2pUOJnDzZae7aIYkFEDbGxTAQgK+P5UA7dNCuVwzFm /wr7TTOm/a4I+XpQuoRKUCJSU0o1AN9LQWSwoGGoxGMuVx2duYXEtWQuIsjeYt0Paifm 4wI7ZFrn3Au+9Px8qYjH4jHBFMwlWxrkBnH/hARXrw+eku340R6VcvVObNvRIx2kh9g1 6PUi7JOqOCAPxmwhR1vy8nKeRQS8q5etIgD7/q3lo5it1mPjUCNLyi+Sj8bCCOy0uJ70 Gv3/JcPF8Hfn2CsTpJRdFfl4HPtvXxh6Cmrj+biUn2XFk7kq+YOGaS/Kad9wtFXH3eL0 liZg== X-Gm-Message-State: AGRZ1gIMXjlhS808S31l8Brijia8X65lj5JQcsJUuGiMeVtthnKJeV0I V4/x/JI6tHllWg4XAuOm1tHob0wJFyeK502bW3Q+RG9T X-Google-Smtp-Source: AJdET5c7IiDWxVBuKoXcR9/t7paRIGSA7nf1QIYpq87fVHJt+KvGipPOB2jXRn1WFSXqSfa9b48lzPJ75aZnaEdsMRE= X-Received: by 2002:a24:11d0:: with SMTP id 199-v6mr305879itf.33.1540579813478; Fri, 26 Oct 2018 11:50:13 -0700 (PDT) MIME-Version: 1.0 References: <20181026145522eucas1p245580c8ddf13dca70b5eae45af9a0205~hMFzZ7wLw1740617406eucas1p2G@eucas1p2.samsung.com> In-Reply-To: <20181026145522eucas1p245580c8ddf13dca70b5eae45af9a0205~hMFzZ7wLw1740617406eucas1p2G@eucas1p2.samsung.com> From: Julien Nicoulaud Date: Fri, 26 Oct 2018 20:49:43 +0200 Message-ID: Subject: Re: Completion issue when zsh is not the default shell To: p.stephenson@samsung.com Cc: Mailing-list zsh-users Content-Type: multipart/alternative; boundary="00000000000087d42d057926301a" --00000000000087d42d057926301a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the detailed answer ! Your second guess was the right one: deleting zcompdump solved the issue. I suspect this is related to bytecode compilation, I have this snippet at the end of my zshrc: autoload -U zrecompile && zrecompile -p $MAIN_USER_HOME/.{zcompdump,zshrc} &>/dev/null So it also could be zrecompile failing to detect changes in zcompdump, I guess ? Unfortunately I deleted the files before thinking of checking the modification times... The home partition is using xfs with options rw,relatime,attr2,inode64,noquota, maybe there is a gotcha. Le ven. 26 oct. 2018 =C3=A0 17:02, Peter Stephenson a =C3=A9crit : > On Fri, 2018-10-26 at 16:25 +0200, Julien Nicoulaud wrote: > > On my work machine bash is the default shell (AD accounts...), and I ha= ve > > an issue with the SSH completion: > > > > ssh stobash: _ssh_hosts: command not found... > > > > Trace file (see line 622): https://pastebin.com/raw/eE6XJbg2 > > > > It looks like at some point bash is invoked, which tries to resolve > > _ssh_hosts and fails. > > > > If I explicitly "autoload _ssh_hosts", it works correctly. It looks lik= e > a > > bug to me ? > > It clearly shouldn't be running bash, but it's entirely unclear from > what you say why it actually is. So I'm just having to guess. > > Presumably _ssh_hosts is being found by your $path, rather than your > $fpath, so being executed as a command rather than function It's not > clear why your system would be set up to find _ssh_hosts that way --- it > means your shell function directory is being searched for commands --- bu= t > it's not actually a problem in general so long as the "autoload" has > been done. > > Given that explicitly using "autoload" works, that means _ssh_hosts *is* > also being found along $fpath. > > So the issue is it's not being marked for autoload automatically. I can > think of a few reasons for this: > > 1. When "compinit" is run, $fpath isn't yet set up properly. You'd > need to track this down in the initialisation sequence. "compinit" > clearly is being run, or the shell wouldn't know about any association > between ssh completion _ssh_hosts. > > 2. You're hitting an old .zcompdump file that doesn't autoload this > but for some reason doesn't get detected as out of date. This isn't > particularly likely but "rm ~/.zcompdump*" is an easy thing to try and > only incurs a one-off reload penalty. > > 3. There's an alternative _ssh_hosts early in your $fpath and it > doesn't contain the first line needed by the completion system, > > #autoload > > that you'll see in the file that comes with zsh. This is probably my > top guess. Have a look at > > print -l $^fpath/_ssh_hosts(N) > > (expand fpath to include any occurence of _ssh_hosts but remove any > entries that aren't matched as files). > > pws > > > --00000000000087d42d057926301a--