From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7573 invoked by alias); 14 Jul 2018 09:28:11 -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: 43168 Received: (qmail 23362 invoked by uid 1010); 14 Jul 2018 09:28:11 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f66.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.214.66):SA:0(-1.9/5.0):. Processed in 1.114902 secs); 14 Jul 2018 09:28:11 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIMWL_WL_MED,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 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=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GdB1cyLHxHZ5jCfhyDQYChThSCbHMr1gxYQrolZkGx0=; b=DBUifM1l5uYwaooMNOt5RNbRXdbx86TemfAbqU7L4CSkT0X/6VI1t2y3BR6N3mBq2P qexkIdpDP6N89uxYxhTAm3mRr3WOIFX5DUzh4EnH1t5/AK9cjHQOoBTCux4ub7O/VmPv 0PCbWmXBQ7kXOYe/KIw52bpmHpxa9ro1UmspWbL6SLcMdSD2Qcl8dyIRlpTeULmPWZzG z3fpqjEOK2zKcG72G3u8dvhLTyuNRgu2nz9mvgcgTAk/h2p/l4vdk8eTmguFQ5k2S3LJ x+7AXQD3YFzek2p7Mcj2nL5ImECBrBOUV0ZqEFStJwaKkl9rErbfFs+84tDtskJoJ+9R b1Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GdB1cyLHxHZ5jCfhyDQYChThSCbHMr1gxYQrolZkGx0=; b=hdCqhY/Mpe777mw4+ue4hAAuf9aVO9NGkLs7lo1cXcNxCOwIQ510Ofol2JSYnQtlMz oddYGLPWsp7v3710y+VPwWkfGRQRjUqqfEpxP40pWnNO8Y9uwYqZJrkYdCae8mty4of0 +62QQA1IG39MjicgcsOaL9MkVLPukypnfcDDCxYQdfEgvGWsKXTY35440l1q5Wwic48B GY1fy9ynGuGjcds4EBrtrn4ijpnaBU6186i/aQeLtRfxCfFl6Dhm9cwUBBjHQuhUAVAp esS7XZhf8DSERl+LeVlw4x75dsZYnKTw7Au/iCiK2+bjTJCq82A0bpPlpV6IMLH0R+e+ LzlA== X-Gm-Message-State: AOUpUlFkBE6Qx7ClNPXLr704LkDrqelHQNhdLaf1wZ5L6ZuBz9S1iTCt 6ToTG19OPkFa629FG5QGDPHjTB6I+IE= X-Google-Smtp-Source: AAOMgpclqv9+Gj8J+7Je0GbXt74IsURv9xWop/Qnh11s2veNs8qW9Qi5XtRZsQMJKf1trz5PZOsXzw== X-Received: by 2002:a24:104d:: with SMTP id 74-v6mr5714903ity.144.1531500911237; Fri, 13 Jul 2018 09:55:11 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: [PATCH] Add completion for zathura. From: dana In-Reply-To: <20180713122909.o5rpg6ocoigx6sv3@NUC.doronbehar.com> Date: Fri, 13 Jul 2018 11:55:09 -0500 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180613163152.28843-1-doron.behar@gmail.com> <20180701171158.6uzs27ooafm4pk42@NUC.doronbehar.com> <20180713122909.o5rpg6ocoigx6sv3@NUC.doronbehar.com> To: Doron Behar X-Mailer: Apple Mail (2.3445.6.18) On 13 Jul 2018, at 07:29, Doron Behar wrote: >How quoting `opt_args` and use `(Q)` will be better as for this issue? The values in opt_args are quoted exactly as they were received from the = command line. So if the user does `zathura -p '/path/to/some/'"file"`, you will = receive it exactly like that, with both sets of quotes, in opt_args. Therefore, = if you don't use (Q), your checks may fail when they would otherwise succeed, = since they're trying to match a path containing literal quotes. There's probably an even better way to do this, but this is what comes = to mind: for plugins_dir in \ ${(Qv)opt_args[(i)-p|--plugins-dir]}(#qN) \ {/usr/local,/usr,}/lib/zathura(#qN) do plugins_files=3D( $plugins_dir/*.so ) (( $#plugins_files )) && break done On 13 Jul 2018, at 07:29, Doron Behar wrote: >These are the options' descriptions I've ended up with: Looks better to my eye dana