From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
zsh-workers@sunsite.auc.dk
Subject: Re: Some possible bugs...
Date: Thu, 27 May 1999 09:34:49 +0000 [thread overview]
Message-ID: <990527093449.ZM24201@candle.brasslantern.com> (raw)
In-Reply-To: <199905270644.IAA09079@beta.informatik.hu-berlin.de>
On May 27, 8:44am, Sven Wischnowsky wrote:
} Subject: Re: Some possible bugs...
}
} > file-completion. Another problem is that if you
} > type:
} > ls "one<tab>"
} > and get:
} > ls "one two"
} > and then type the next couple of characters and
} > press tab again, like so:
} > ls "one two f<tab>"
} > no completion is done at all.
} > Bash does this type of thing quite nicely. It might
} > be an idea to take a leaf from their book, so to
} > speak.
}
} The problem is that in things like `zsh -c "ls <TAB>' one doesn't want
} the shell to treat the `"ls ' as one string. So when completing inside
} quotes, zsh treats words separated by spaces as outside the quotes.
How hard would it be to make this context-sensitive? For example, when
the effective compctl says to complete file names, treat the entire
quoted string as one word and attempt to complete it as a file (this is
what bash appears to do); similary for command names or anything else
that normally results in a single shell "word"; otherwise, complete the
way it's presently done. This might require another compctl option,
similar to using compctl -x ... -l '' ... except that the
"range of command line words that are considered to be arguments" is a
single word that has to be split at IFS before completing.
So to get the current behavior you'd use something like (writing old style)
compctl -x 'c[-1,-c]' -1 -l '' -- zsh
where I'm using -1 as this new option I've described for no better reason
than that I can't remember which (if any) letters are left for compctl.
This would also mean that, in the case where a single word such as a file
name is expected to result, zsh could automatically close the quotes and
append a space after the closing quote.
This so-called -1 option could apply to any other flag that followed it,
not just -l ... generically, it would mean "unquote and split the current
word, find a new current word after the split, then complete using the
following flags, and finally requote the result."
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
next prev parent reply other threads:[~1999-05-27 9:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-27 6:44 Sven Wischnowsky
1999-05-27 9:34 ` Bart Schaefer [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-05-27 11:10 Sven Wischnowsky
1999-05-26 6:20 Sven Wischnowsky
1999-05-26 4:03 Aldo Cortesi
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=990527093449.ZM24201@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.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).