From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: colonic _values with paths
Date: Tue, 18 Apr 2000 14:23:47 +0200 (MET DST) [thread overview]
Message-ID: <200004181223.OAA10448@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Tue, 18 Apr 2000 12:54:31 +0100
Peter Stephenson wrote:
> This is rather minor, but I happened to notice.
>
> _values always adds a suffix `:' when it's dealing with colon-separated
> arrays.
You mean `_value'. We have both of them. In the same directory.
Terribly irritating.
> This is actually pretty annoying if the elements of the array are
> paths, when you'd prefer to have the usual `/' and add a `:' by hand where
> necessary. How about only adding the `:' if the element doesn't already
> contain a `/' or initial `~'? Or suppose I get in the habit of using
> `typeset -T' and adding things to real arrays? Maybe the second
> alternative is better.
I wasn't sure which is better... this makes it insert the `/' as
usual. Unfortunately I can't think of a good way to make it add a `/'
for directories and a `:' for other files.
But at least this also makes the colon remove the slash.
Bye
Sven
Index: Completion/Base/_value
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_value,v
retrieving revision 1.2
diff -u -r1.2 _value
--- Completion/Base/_value 2000/04/17 08:22:44 1.2
+++ Completion/Base/_value 2000/04/18 12:23:09
@@ -23,7 +23,7 @@
[[ "$PREFIX$SUFFIX" = *:* ]]; then
compset -P '*:'
compset -S ':*'
- _default -qS: "$@"
+ _default -r '\-\n\t /:' "$@"
else
_default "$@"
fi
@@ -46,7 +46,7 @@
elif compset -P '-R'; then
compset -P '*:'
compset -S ':*'
- _files -/ -S/ -r ' :' "$@"
+ _files -/ -S/ -r '\n\t\- /:' "$@"
else
_default "$@"
fi
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
reply other threads:[~2000-04-18 12:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200004181223.OAA10448@beta.informatik.hu-berlin.de \
--to=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).