From: Tim Goodwin <tjg@star.le.ac.uk>
To: carlos@scriptaworks.com
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: Beta release rc-1.6b3 available
Date: Tue, 23 Oct 2001 07:44:31 -0500 [thread overview]
Message-ID: <20011023114431.3825.qmail@happy.star.le.ac.uk> (raw)
In-Reply-To: <20011023085557.A16410@texne.com> (carlos@scriptaworks.com)
> Mine is not really a bug report, buth rather a request for a new
> feature. I dunno whether it has been asked before on this list, but
Trust me: it has been asked before :-).
> are there any chances that rc will ever handle [tilde expansion ?]
Probably not. Before it could happen, we would need:
i) somebody to figure out how tilde expansion can co-exist with rc's
existing interpretation of tilde; OR
ii) somebody to persuade the tilde expanders of an alternate syntax
they are happy with.
Note that if you can twist option ii) far enough, rc *already* has
tilde expansion :-).
; fn h {if(~ () $1){echo $home}else perl -le 'print ((getpwnam('^$1^'))[7])'}
; echo `h
/h/tjg
; echo `{h games}
/usr/games
You should be horrified at the use of Perl here, so compile the
program below as `homedir', and use:
; fn h {if(~ () $1){echo $home}else homedir $1}
Cheers,
Tim.
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
int main(int argc, char **argv) {
if (argv[1]) {
struct passwd *p = getpwnam(argv[1]);
if (p)
puts(p->pw_dir);
}
}
next prev parent reply other threads:[~2001-10-23 19:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-15 13:56 Tim Goodwin
2001-10-17 14:13 ` Buggs
2001-10-17 14:34 ` Tim Goodwin
2001-10-17 21:13 ` Buggs
[not found] ` <20011019004843.A429@gc.wirefire.com>
2001-10-19 17:14 ` Tim Goodwin
2001-10-22 6:47 ` Scott Schwartz
2001-10-24 3:25 ` Chris Siebenmann
2001-10-24 3:41 ` Scott Schwartz
2001-10-23 7:55 ` Carlo Strozzi
2001-10-23 12:44 ` Tim Goodwin [this message]
2001-10-23 21:32 ` Carlo Strozzi
2001-10-24 3:34 ` Chris Siebenmann
2001-10-24 8:04 ` Carlo Strozzi
2001-10-23 15:47 ` Markus Friedl
2001-10-23 21:09 ` Carlo Strozzi
2001-10-23 15:55 ` Sam Roberts
2001-10-23 21:14 ` Scott Schwartz
2001-10-26 23:57 Gary Carvell
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=20011023114431.3825.qmail@happy.star.le.ac.uk \
--to=tjg@star.le.ac.uk \
--cc=carlos@scriptaworks.com \
--cc=rc@hawkwind.utcs.toronto.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.
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).