From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: quote modifier for parameter expansion?
Date: Wed, 3 Feb 1999 16:52:37 +0100 (MET) [thread overview]
Message-ID: <199902031552.QAA13399@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Wed, 3 Feb 1999 16:00:52 +0100 (MET)
I wrote:
> People using the new style completion stuff (and the new-completion-examples
> find) who test the thing quoted above will notice that it completes
> files beginning with `I' in this case. This is due to the parameter
> handling in pfiles(). More precisely, this is due to the fact that we
> still haven't got a way to quote strings resulting from a parameter
> expansion (supporting the `q' modifier for parameter expansion has
> long been on the wish list but still isn't implemented).
Hm. I'm sure I'm missing something again, but could anyone please tell
me what? The patch below (which probably shouldn't be used) just uses
the quote()-function from hist.c to make the `q' modifier in parameter
expansion work. The result is almost always a funny looking string in
single quotes, but that alone can't be the reason not to use this
function.
Bye
Sven
--- os/subst.c Wed Feb 3 12:07:13 1999
+++ Src/subst.c Wed Feb 3 16:36:39 1999
@@ -1708,6 +1708,7 @@
case 't':
case 'l':
case 'u':
+ case 'q':
c = **ptr;
break;
@@ -1826,6 +1827,9 @@
if (hsubl && hsubr)
subst(©, hsubl, hsubr, gbal);
break;
+ case 'q':
+ quote(©);
+ break;
}
tc = *tt;
*tt = '\0';
@@ -1876,6 +1880,9 @@
zsfree(oldstr);
}
}
+ break;
+ case 'q':
+ quote(str);
break;
}
}
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-02-03 15:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-03 15:52 Sven Wischnowsky [this message]
1999-02-03 16:02 ` Peter Stephenson
1999-02-03 17:20 ` Bart Schaefer
1999-02-03 16:28 Sven Wischnowsky
1999-02-05 8:50 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=199902031552.QAA13399@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).