zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@thoth.u-net.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
	zsh-workers@sunsite.auc.dk
Subject: Re: Completion in braces limitation
Date: Tue, 27 Apr 1999 16:45:27 +0100	[thread overview]
Message-ID: <3725DB97.CA9BBB4B@thoth.u-net.com> (raw)
In-Reply-To: <199904271337.PAA13588@beta.informatik.hu-berlin.de>

Sven Wischnowsky wrote:

> This was intentional, the completion gave up as soon as it found the `$'.
> The patch below makes it try a little harder by looking at what comes

> I would be thankful if someone (you?) could test this more thoroughly,
> though.

Brilliant. That seems to work well. I've tested it quite thoroughly but
will do some more testing of it later (when I'm not at work).
 
> Well, the new style completion can do this, of course...

I really ought to find some time to try this new completion.

One thing which I did notice while testing a few things out with
completion in braces is that it doesn't work quite as I'd like with
things of the form $(...).
Try:
zsh -f
sw() { echo /home/native_rs6000 }
cd $(sw)/{<tab>

This expands $(sw) and quotes the brace. There may be a reason for doing
this but I can't think of one.

Also (not using a brace), typing a bit more before the tab:
cd $(sw)/tes<tab>
will expand $(sw), leave '/tes' on the end and add a space. What would
be nice is if it had completed to the 'test' directory which I have
there. Back quotes behave in the same way.

Another way that $(...) is treated differently to a variable regards
when zsh expands it:
cd $PWD<tab> - expands the value of $PWD
cd $PWD/<tab> - does not expand $PWD. I find this useful.
cd $(sw)/<tab> - this will expand $(sw).

Finally, I noticed this behaviour:

bindkey "^G" list-expand
cd $PWD/<tab><^G><tab>
This lists directories in $PWD after the first tab. I then listed the
value of PWD with Ctrl-G, then wanting to go back to the list of
directories, I pressed tab again. This started menu completion instead
of returning to the list. I suppose I should remember to use Ctrl-D
instead of tab again but if it's a simple change, it might be useful if
things which overwrite the list (such as list-expand) revert things as
if the original tab had not been pressed.

Thanks

Oliver Kiddle


  reply	other threads:[~1999-04-27 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-27 13:37 Sven Wischnowsky
1999-04-27 15:45 ` Oliver Kiddle [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-05-03  9:25 Sven Wischnowsky
1999-04-28  7:19 Sven Wischnowsky
1999-04-28 16:43 ` Bart Schaefer
1999-04-27 12:56 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=3725DB97.CA9BBB4B@thoth.u-net.com \
    --to=opk@thoth.u-net.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).