zsh-workers
 help / color / mirror / code / Atom feed
From: "Nikolay Aleksandrovich Pavlov (ZyX)" <kp-pav@yandex.ru>
To: Bart Schaefer <schaefer@brasslantern.com>,
	zsh-workers <zsh-workers@zsh.org>
Subject: Re: Regression: broken completion on modification time
Date: Fri, 17 Jun 2016 22:10:13 +0300	[thread overview]
Message-ID: <706581466190613@web21m.yandex.ru> (raw)
In-Reply-To: <160617111101.ZM488@torch.brasslantern.com>



17.06.2016, 21:11, "Bart Schaefer" <schaefer@brasslantern.com>:
> On Jun 17, 6:19pm, Oliver Kiddle wrote:
> }
> } How would you want to present the exactly match given that it inserts
> } nothing? In the past with the match -- description form, we didn't
> } include it. With the description only form it is less out-of-place.
>
> Isn't there a way to stick a dummy match into the listing just to take
> up space so that only the description will appear?
>
> } > I tried to reproduce this in 'zsh -f', but "echo *(m<TAB>" simply cycled
> } > between various integers after the 'm'; it didn't give the calendar
> }
> } This could be adjusted so normal completion would dump the calendar.
> } But is a calendar without menu selection at all useful?
>
> I think that in any case where the calendar won't be displayed [almost]
> immediately, an entirely different set of matches should be passed to
> compadd, or at least they should be added in a different order. The
> current ordering of the numbers etc. makes very little sense without
> the visual of the calendar, and they're inserted directly into the
> command line so completing after e.g. "ls *(m" you get things like
>
>     *(m0
>     *(m32
>     *(m31
>     ...
>     *(m17
>     *(ms
>     *(mm
>     *(mh
>     *(md
>     *(mw
>     *(mM
>     *(m+
>     *(m-
>     *(m108
>     *(m107
>     ...
>
> The user is left wondering "why 0 then 32 ?" and will never get to the
> s/m/h/d/w/M unless he perseveres whacking TAB 15 times, at which point
> "why did it stop at 17 ?"
>
> Also even when using list-choices:
>
> torch% ls *(m0
> zsh: do you wish to see all 233 possibilities (18 lines)?
>
> If I don't know there's a calendar coming, why would I answer "yes"?

I would say “yes” just to check what possibilities is it talking about. Question is why would I hit `<Tab>` in first place: if I did not see this discussion I would not ever suggest that completing a (mostly) numeric and in any case very short argument to `m` has any sense.

Also if I write `ls *(m)` with cursor after `m` and hit `<Tab>` I get “Completing: digit (invalid time specifier)” (nothing if I use `autoload compinit ; compinit` in `zsh -f`, or “Completing: `files'” with no list after `unsetopt completeinword`): the second main reason why I would not try this in the first place is that when you face the necessity of creating nested parenthesis it is far more convenient to use something that will write both parens at once (like various Vim autoclose plugins or my `,s` -> “`()<Left>`” binding) and place cursor in between, otherwise it may be too hard to get the expression closed properly, and zsh completion usually is inadequate if current word continues after the cursor (still sometimes I make use of “completeinword”, but this does not apply to any glob expressions with parenthesis/braces/brackets/etc). I do not think that I am the only programmer that is using this in zsh.

Particularly, the most failing thing is `ls foo{bar<Tab>}`: this usually either does nothing or expands immediately if I already happened to write a comma.

> And if menu selection is not enabled, I won't have any idea which of
> the elements being inserted on the command line corresponds to what
> part of the calendar even after I can see it (you already alluded to
> this in a previous message).


  reply	other threads:[~2016-06-17 19:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12 20:32 Dima Kogan
2016-06-13  0:47 ` Bart Schaefer
2016-06-13  1:37   ` Dima Kogan
2016-06-13 22:00   ` Oliver Kiddle
2016-06-14 16:14     ` Bart Schaefer
2016-06-15 16:32       ` Oliver Kiddle
2016-06-15 23:24         ` Daniel Shahaf
2016-06-17 16:19           ` Oliver Kiddle
2016-06-17 18:11             ` Bart Schaefer
2016-06-17 19:10               ` Nikolay Aleksandrovich Pavlov (ZyX) [this message]
2016-06-17 22:02                 ` Oliver Kiddle
2016-06-17 22:20                   ` Nikolay Aleksandrovich Pavlov (ZyX)
2016-06-17 22:33                 ` Bart Schaefer
2016-06-17 22:49                   ` Nikolay Aleksandrovich Pavlov (ZyX)
2016-06-17 23:00                     ` Bart Schaefer
2016-06-17 23:50               ` Oliver Kiddle
2016-06-19 16:04                 ` Bart Schaefer
2016-06-21  1:41             ` Daniel Shahaf
2016-06-21 14:31               ` Oliver Kiddle

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=706581466190613@web21m.yandex.ru \
    --to=kp-pav@yandex.ru \
    --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).