From: Marlon Richert <marlon.richert@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] Increase $COLUMNS when generating long option completions
Date: Tue, 10 Aug 2021 22:17:08 +0300 [thread overview]
Message-ID: <CAHLkEDvqwHhkT05t4+KKsMGmcY5_7MshpAbEnZEDWYKer5R-SA@mail.gmail.com> (raw)
In-Reply-To: <CAHLkEDsSDy5Ut4VRbj6dUB0NgKrWggZTGTV7MCz2v_6n=Y+TwQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 713 bytes --]
On Tue, Aug 10, 2021 at 10:04 PM Marlon Richert
<marlon.richert@gmail.com> wrote:
>
> On Sun, Aug 8, 2021 at 1:41 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
> >
> > On Sat, Aug 7, 2021 at 12:56 PM Marlon Richert <marlon.richert@gmail.com> wrote:
> > >
> > > How does this patch look to you?
> >
> > Frankly, it looks unnecessarily complicated. What's the rationale for
> > using COLUMNS=999 as a command prefix in every "eval", rather than
> > just declaring once
> > local -x COLUMNS=999
> > at the start of the function?? Why rearrange the other declarations?
>
> TIL you can export parameters locally. Here's a new patch.
And since we're on the topic, this patch adds `-x` to `local` completion.
[-- Attachment #2: 0001-Complete-local-x.txt --]
[-- Type: text/plain, Size: 779 bytes --]
From 8742ba63ebccbba1c367663094e0f1c10dd2107b Mon Sep 17 00:00:00 2001
From: Marlon Richert <marlon.richert@gmail.com>
Date: Tue, 10 Aug 2021 22:11:28 +0300
Subject: [PATCH] Complete `local -x`
---
Completion/Zsh/Command/_typeset | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Zsh/Command/_typeset b/Completion/Zsh/Command/_typeset
index 3f7de9706..5f7fb24fa 100644
--- a/Completion/Zsh/Command/_typeset
+++ b/Completion/Zsh/Command/_typeset
@@ -69,7 +69,7 @@ case ${service} in
allargs[i]='-i+[specify arithmetic base for output]:: :_guard "[0-9]#" base' \
;;
readonly) use="${use/r/}" ;;
- local) use="${use/[fkz]/}" ;&
+ local) use="${use/[fgkz]/}" ;;
export) use="${${use//[gkz]/}/x/}" ;;
esac
--
2.30.1 (Apple Git-130)
prev parent reply other threads:[~2021-08-10 19:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-01 19:24 Marlon Richert
2021-08-01 23:06 ` Bart Schaefer
2021-08-03 14:05 ` Marlon Richert
2021-08-04 1:12 ` Lawrence Velázquez
2021-08-04 3:48 ` Bart Schaefer
2021-08-04 6:51 ` Marlon Richert
2021-08-04 7:19 ` Lawrence Velázquez
2021-08-05 6:19 ` Marlon Richert
2021-08-05 6:24 ` Bart Schaefer
2021-08-05 18:11 ` Marlon Richert
2021-08-05 23:44 ` Bart Schaefer
2021-08-07 19:55 ` Marlon Richert
2021-08-07 22:41 ` Bart Schaefer
2021-08-10 19:04 ` Marlon Richert
2021-08-10 19:17 ` Marlon Richert [this message]
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=CAHLkEDvqwHhkT05t4+KKsMGmcY5_7MshpAbEnZEDWYKer5R-SA@mail.gmail.com \
--to=marlon.richert@gmail.com \
--cc=schaefer@brasslantern.com \
--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).