zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Completion weirdity after `for'
Date: Mon, 18 Jan 1999 18:20:06 +0100	[thread overview]
Message-ID: <9901181720.AA42924@ibmth.df.unipi.it> (raw)

After

for f in <TAB>

completion takes place as if the command name is `in', not `for'.
This showed up because I have a function called `in' such that `in dir
cmdlist' executes cmdlist in directory dir, so I have the first word
after `in' complete directories, which is not what is wanted here.

The natural way to handle this would be such that everything up to and
including the list were treated as words of a fictitious `for'
command, so e.g. you can specify special behaviour for arguments 1 and
2 and default for the rest.  This is possible to fix, but like most
things to do with get_comp_string() the fix could be a little ad hoc.
Maybe other reserved words need some fix-up, but for and foreach are
the worst offenders since others tend to be followed by a specific
command which then works in the expected way.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


             reply	other threads:[~1999-01-18 17:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-18 17:20 Peter Stephenson [this message]
1999-01-20 11:12 Sven Wischnowsky

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=9901181720.AA42924@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@math.gatech.edu \
    /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).