From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43592-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=-1.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,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 85ffd941 for ; Wed, 3 Oct 2018 14:56:53 +0000 (UTC) Received: (qmail 17928 invoked by alias); 3 Oct 2018 14:56:43 -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: List-Unsubscribe: X-Seq: 43592 Received: (qmail 4811 invoked by uid 1010); 3 Oct 2018 14:56:42 -0000 X-Qmail-Scanner-Diagnostics: from mail-it1-f179.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.179):SA:0(-1.9/5.0):. Processed in 2.427851 secs); 03 Oct 2018 14:56:42 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=I54W4eynbgTtusQekrkMadLVv9C114Aa6fCzcyIT3Ho=; b=UDPOAwfRVPJz6gGO/mTvewjOSdCV8zh8Xk1cCl7C7O0mDbI/q8Rp1zyKvP//UWEjh7 mc4emrK9ovulcSu5EpmXb/bpC+veNrGmDrBx3llTmKd1e7PA1sRsK64FsDRVD9x+aZ/v 2C7HHmc1xN6CVFRl45iLHr4gqzbidBSSHaiLu1XFa4Y6mjMJ0+tiouk5FvTxPyk+gFz5 ki43VuHwt0Z8AAD9VW1DVSumQmZgthkHq+RBYWpclwpSLAGOvV+iHCNjmjIHpGSEeIZS UtPJ9zGkreSzr6lEOTFp7LhpYFmXuzAyRezNjEe/LfahvEC7/gTiqJAY/qUupwHRGY8/ 5HSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=I54W4eynbgTtusQekrkMadLVv9C114Aa6fCzcyIT3Ho=; b=T8e1HTgHy/4l3NqhwS0LAKPTiT2XI5OceQP0gzjhxYoULs6ajcH2oP9OJ0M2pCLhj7 I/e2M754ylRnu/B+Y6PPrsio7dcPjis5bLvfX/tDHXL6ANa7odduymzDm4Vl6xlf7sy0 o6ugzSQhZKsS9/02WTxMRdX3ZuQExs3dAu4X8ZoCqrzuq/5JdliN7WQrx9y1+zKRgyil wytTlwRym4pFIywgrJ02Lmt9Xr0MvM2BLyxOciXO0y4YjkuZ96NqluKMmWLcTxqzAvSY 7i1l47nPKXcTGOPOCUisQoK/Tpt+TxShDncC72jZ4ZS/8Io3cayyVihWQ+0RXrkkP1Dw xXKQ== X-Gm-Message-State: ABuFfoj/QHjPTH8Xsbx+9KJakLUfCW1l2ANOvfjdrebrNnLTZI43+jN6 h4kPhPmnbVMku67XvmL2a65dFc5LKlaWNg== X-Google-Smtp-Source: ACcGV63pXBxwkx3qp0e3FzUiMvX6Yeyt+rNVWGvhDGrysru9hpc3IauCQ74v7lE6VclSdQOkU3VLkQ== X-Received: by 2002:a24:4254:: with SMTP id i81-v6mr1514117itb.95.1538578596176; Wed, 03 Oct 2018 07:56:36 -0700 (PDT) From: dana Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: [BUG?] Unexpected behaviour with `compdef -p` Message-Id: <97754736-115B-4EF2-B10C-9DE17345C9DB@dana.is> Date: Wed, 3 Oct 2018 09:56:32 -0500 To: Zsh hackers list X-Mailer: Apple Mail (2.3445.9.1) I was trying to use `compdef -p` to avoid having to list out a large = number of commands i want to complete that all have the same prefix, and i found = that it doesn't really work the way i expected =E2=80=94 it destroys the = completion output. Example (with completion loaded obv, and i have menu selection on in my = case): % cat _xyz _arguments -s -S : {-h,--help}'[display help information]' % fpath=3D( $PWD $fpath ) % autoload -Uz _xyz % compdef _xyz -p 'xyz*' % xyzabc - completing option: --help -h display help information --help -h display help information --help -h display help information <... and so on; the output is essentially garbage> When i use -P instead of -p, the output is as expected. Mikael had the following to say when i brought it up on IRC: < Mikachu> i guess it ends up calling the completer two times < Mikachu> -p is tried "before other completions" < Mikachu> okdana: if i do the compdef _xyz -P xyz\* then < Mikachu> xyz will show just -h and --help < Mikachu> if i do -p instead, then xyz shows -h and --help = correctly but also completes files < Mikachu> if i do xyz - then it shows the bogus output < Mikachu> so yeah, with -p you call your completer, then the default completer list is tried in some weird way, and then the = completer gets called again by the normal path < Mikachu> i don't know if any of that is intended < Mikachu> (i also made sure to use compdef -d -p xyz\* etc between = each test) I am not that familiar with the part of the completion system that deals = with this. Is the above in fact the intended behaviour? (If it is, what = scenario would one use -p in where it wouldn't cause these problems?) dana