From: Bart Schaefer <schaefer@brasslantern.com>
To: Karel Balej <balejk@matfyz.cz>
Cc: zsh-workers@zsh.org
Subject: Re: [RFC PATCH 1/2] complete absolute paths for mpc add
Date: Sat, 9 Nov 2024 11:44:08 -0800 [thread overview]
Message-ID: <CAH+w=7az25SsJsydSC9_aNOJh16DHOqsgpWZ36FYbDUfF_m55Q@mail.gmail.com> (raw)
In-Reply-To: <20240927163300.25833-1-balejk@matfyz.cz>
I didn't see this the first time around for some reason.
On Fri, Sep 27, 2024 at 9:34 AM Karel Balej <balejk@matfyz.cz> wrote:
>
> +(( $+functions[_mpc_helper_all_files] )) ||
> +_mpc_helper_all_files() {
> + if [[ $words[CURRENT] == [/~]* ]]; then
> + _files
> + fi
> + _mpc_helper_files
> +}
If _files succeeds ($? == 0) but _mpc_helper_files fails ($? != 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=1
if [[ $words[CURRENT] == [/~]* ]]; then
_files
ret=$?
fi
_mpc_helper_files || return ret
}
next prev parent reply other threads:[~2024-11-09 19:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 16:31 Karel Balej
2024-09-27 16:31 ` [RFC PATCH 2/2] enable completion for mpc insert Karel Balej
2024-11-09 15:21 ` [RFC PATCH 1/2] complete absolute paths for mpc add Karel Balej
2024-11-09 19:44 ` Bart Schaefer [this message]
2024-11-10 18:56 ` Karel Balej
2024-11-10 23:10 ` Bart Schaefer
2024-11-11 19:26 ` Karel Balej
2024-11-12 2:52 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7az25SsJsydSC9_aNOJh16DHOqsgpWZ36FYbDUfF_m55Q@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=balejk@matfyz.cz \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).