From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id C7B0D24A43 for ; Sat, 9 Nov 2024 20:44:37 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1731181477; b=mK17Y6qcLN2bHQoohiu4WvNlwsqg1CXP09Z53wRSbrmBbluiiGBz8pWDA87r7wjF6NaBRFj2oa aZxdzVUETRWViVV1cptoMaNvrC72Z3/JRaq/er3xxyeYxuulYyaKhloQd4Tp2CPLoCMsqgPybR 9GR78Hs+bFcI/GzUKTCQTvWRdCcpGTylScYN2srNuGt700O7xGPN1I3BTo753i0tnIgisiaGtR uCMPjhIO+gBPFEu2IBH1fRm3P/haynXuSEO20f44eLL7nMnhVMk99jw3mYu8isuc8rs7er2hSH gXX+FSqmO3pjJiPtQgivXr3vYbYZ26q4vbcRFkRzRw7xTQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f48.google.com) smtp.remote-ip=209.85.208.48; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 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-20210803; t=1731181477; bh=5xERx5qCeOnmftHPIAb7hFnKjKSDQ3/iSRywHSMgbzw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=A22aZTiNKievsatau+NL+//ZQfghXA7nyeUJcY6XFXBwbnv9lYS9oarhqIZKV8hML7g7LwALcz S5HNp6ppCRVMNhlmyuX6BTCIy9Ic2T6sjRUr6QjpP4U7/nJGDhx8OcltuqCZZyq0uSpznPa6dD 3HJQyWNX0Bk3VjvK+ETWaetozNM8GG5qFfhYa9vsxIs3UyWDK6DPJ2hHwQ0EIA4ZQidVjzBqpI dV1AHiCcjjxXnRU/ghs1TVvqEm4JFQJghQ5oEXJaE3XrmfBTizBELLlgoxSswj1OcIcGMu/Seo 4rfi4jTR7zbazBFb1mrdh/wiYM0XX7pbhOnGSEEUxjFtWQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=CBnjsXl8nsbjvbTb4VewebgY02zJW5cNZGcNMMDBrfI=; b=n2Jgvh4gmbKQ0bDy+zj/awS+Vw 5M33BGiqt+FmEmrYanOsT489BkSl46lJKKOihhouGmDkO0E83H6NFJ/v7MZNLxnMjt+Oee9pkKJpr 1SiIEDyF/kS4y0LxjiMH58IvLAMhH3cRgivlmcOgZ3LzyneBGnZqyJiZYqP292JAR07O3U1IpEl/+ SqtdS5N/f5xXphZt3xsCl1zORwLiHJP4ltCxwX+gL+S9mWFQc7AQS418J62rXKhpXVPywJ9eV0SVs E6SVTVWS4Iq4QYPmjuC3wjwhDYHLPbfFpNAtTxziSUpdByLeFG7DzZ0jyzYRTrAY1RZsX5VXuCcKN ieC22PiQ==; Received: by zero.zsh.org with local id 1t9rNt-000IlI-1K; Sat, 09 Nov 2024 19:44:37 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f48.google.com) smtp.remote-ip=209.85.208.48; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f48.google.com ([209.85.208.48]:39466) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1t9rNc-000IS8-4K; Sat, 09 Nov 2024 19:44:20 +0000 Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5cb991f265aso522729a12.2 for ; Sat, 09 Nov 2024 11:44:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1731181459; x=1731786259; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CBnjsXl8nsbjvbTb4VewebgY02zJW5cNZGcNMMDBrfI=; b=DJPlUn64XCIko2aG85XU+tnLwUAjUTIYZSx25aMrmlp3sR1eCBN01NJetw4sPbL6xu jWbLKhC3mReQxQuJstRQDrcZu/1Mu6mGhatyBPrflEXen/xn9FFCK01xWYAWbgOOg35m rAUF++NVaPxEJmV1smMiMoNgRLXnwo5a0JJNAVJ/sdn3htU/XzGsj7M1Kee7wDvF/thc oMsc3lafY8IPTsifKJXY3cpHlJAcHhOgR/n13hUWQP3wd+23mU7cEiMzN8AS+1zECEC+ 55NArX+sjip9GnSKy4nLYL/Y2u2Ti+4r06d9sHzlK1vkwldmIwz5iCHLxuzcn8DP+lvz h9Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731181459; x=1731786259; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CBnjsXl8nsbjvbTb4VewebgY02zJW5cNZGcNMMDBrfI=; b=FUKCJHGuZ30Irepg17WnOeYclWmVrsiEVxA69H/V6ofVJfliQiDukWCnftI8RrPtw8 uaJmlLAj8AAwaCz4a9CsTcCpJHCrq5C7sQNyEWxV0VWSENITZBSSiDqCocQx6BEJt8NF +y+2lhFM31z8V3YRF9QC80Gx0lXjmtqTNHuXICUCiI4CDFAMKsuJAkDc8TOE4AsgoqTA LoEp0M3Dz9FnK7Kcwk9mOW9mOL5Gw062+GMbKVYJiWA+qRgrMtXXyqa7F4qEGKZoLy83 DKXKQ/HVhM6D6z0K+p5jfQoxAIp6FhrM3rEP6TaER118T01pT+TY26+IumSF9dQb2wmA ZhIg== X-Gm-Message-State: AOJu0Yw1DvbWBeZ9+B4FqQoyzmLkcZ1R3ngS8YwLalxosAEGHDTHSFIy VpTFKpPTY36Qz34S9A3Cu0qpHVF62bR2rkiVaOFJ1EYQ5xnLQmxQ2q3Znnwy0tMpuT0DW6MdtFQ S3fQ7GWMZDMKRu/OwxWWWLl9pJq+/fVKGCSEWVDkyl4BBIb6IOjMq X-Google-Smtp-Source: AGHT+IF84uwo0cTDlaldybOvE3pRJ1yN9jFHyuMnB08ff9c8MRbie8otE+99TNo3B6v1+TtdbJmezSwk08IwgjzbYHQ= X-Received: by 2002:a17:907:7ea4:b0:a9a:3999:23e9 with SMTP id a640c23a62f3a-a9eefeed0bemr255210966b.6.1731181459458; Sat, 09 Nov 2024 11:44:19 -0800 (PST) MIME-Version: 1.0 References: <20240927163300.25833-1-balejk@matfyz.cz> In-Reply-To: <20240927163300.25833-1-balejk@matfyz.cz> From: Bart Schaefer Date: Sat, 9 Nov 2024 11:44:08 -0800 Message-ID: Subject: Re: [RFC PATCH 1/2] complete absolute paths for mpc add To: Karel Balej Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 53233 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: I didn't see this the first time around for some reason. On Fri, Sep 27, 2024 at 9:34=E2=80=AFAM Karel Balej wrot= e: > > +(( $+functions[_mpc_helper_all_files] )) || > +_mpc_helper_all_files() { > + if [[ $words[CURRENT] =3D=3D [/~]* ]]; then > + _files > + fi > + _mpc_helper_files > +} If _files succeeds ($? =3D=3D 0) but _mpc_helper_files fails ($? !=3D 0) then _mpc_helper_all_files will appear to fail and completion will proceed to the next possible alternative. Does something like the following still give the result you expect? _mpc_helper_all_files() { local ret=3D1 if [[ $words[CURRENT] =3D=3D [/~]* ]]; then _files ret=3D$? fi _mpc_helper_files || return ret }