From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 70f6f1a5 for ; Fri, 30 Nov 2018 18:47:34 +0000 (UTC) Received: (qmail 13240 invoked by alias); 30 Nov 2018 18:47:17 -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: 23772 Received: (qmail 18344 invoked by uid 1010); 30 Nov 2018 18:47:17 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f42.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(209.85.210.42):SA:0(-2.0/5.0):. Processed in 1.55346 secs); 30 Nov 2018 18:47:17 -0000 X-Envelope-From: kovpas@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:reply-to:from:date:message-id:subject:to; bh=F6ZJgJI2ZZG3aostsTrqH+8iInnd/3R3fcObtQVzTgk=; b=sMpXvKAAhZWbO4eRtGqZjgZTgE04EL52EjX8yMpbpx6xDxCWDUrxXcJZgCsiDW9ZjP C/RDsp1FCnXtEy0F2xVMJAjR7ueouwYTbRW/0FqakLusJcDaU/Uef8zu1Tx6MA/PnhG2 QCZGFPmKvBQD9mjgOLmxG2ZzbiRWUVSgIL3DuqU4DRff2PkpXJN2fdFojLdKmDeOSSwc VXQokJu/7TOGNqKrd1vDwcz75Z/4myoL1Bccw5yPfRYLYE8tXdy2cyzpD/xKH+v+xMSS 4zXOIOfh1asHHVOqkBXy4/6zOGuv+EIkH+RgsArAG/tok8o/cRvOzaAPP7tNbsG0pzEd sfRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=F6ZJgJI2ZZG3aostsTrqH+8iInnd/3R3fcObtQVzTgk=; b=frPUl1pMWIPXkUUeutVWJNjfhcbjA0lU1hWF8ZZdm9EPi3+Bk461bYbgtTq/SU2Ak7 PF2Fw86LW/SAqq/9zCTJOrDU0cgSVB4O6oZxwYQ9PTSuKBc5tH1Uuuj0hU+kIuryykXH 1aDO8bc0grKFVFRxv/Ko9ZGcZapOFRXOzVgx/cYamxPenxRC+iaVeZfAJLNfbAbmD6xe TKP7RkNNO82Iwc5pfRbvFxS4YPdvQ5GSHk/MFg7fyDs6c1FDo4h9RDiVHnSlyU9HIR7o oiWaSDuNxHPZxbIbYcBAIrsBLS3J2j6Xncaj5urBvFMSUYUpA32X9Q78YV0VIjWCCaXP Kohg== X-Gm-Message-State: AA+aEWZtfd4ozJdGbTY0qnsvxslhniXIGA5EwffA9Ypy3n8QuDxPwgMk 7IWLLfJQidIB82sc5I7FmnEkJ8UmMm0gXN+8JReRxg== X-Google-Smtp-Source: AFSGD/Ur+PdUpC8KKG7IA2qqTEZrjPfX+S7zsTr9HgU1f06PhSnoxT9wnF5QKkprteKU5act6PNs/gUFCXNDtA3dbto= X-Received: by 2002:a9d:c68:: with SMTP id 95mr4354033otr.356.1543603631940; Fri, 30 Nov 2018 10:47:11 -0800 (PST) MIME-Version: 1.0 Reply-To: kovpas@gmail.com From: "Pavel S. Mazurin" Date: Fri, 30 Nov 2018 19:47:00 +0100 Message-ID: Subject: _files conditional custom separator To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="00000000000027e8a1057be63a0f" --00000000000027e8a1057be63a0f Content-Type: text/plain; charset="UTF-8" I'm trying to create a completion script for buck . In essence, I want to be able to complete the following format: buck //path/to/my/buck/file:TargetName I managed to make completion work for the most part: I can complete everything up to the TargetName: buck //path/to/my/buck/file/ with the following script: if compset -P '//'; then _files -/ fi The problem is that _files adds this / in the end of the path. However, I want to have a check: if the path contains a BUCK file, I want this slash to be replaced with a colon: buck //path/to/my/buck/file: Is there any way to achieve this? -Pavel --00000000000027e8a1057be63a0f--