rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Decklin Foster <fosterd@hartwick.edu>
To: rc@hawkwind.utcs.toronto.edu
Subject: tilde featuritis alert
Date: Thu, 9 Dec 1999 02:52:05 -0500	[thread overview]
Message-ID: <19991209025205.B305@debian> (raw)

I'm sure this has come up before, but being a relative rc newbie, I
really miss my '~' for home directory from bash. my question is, what
exactly is the pattern matching '~' in rc *good* for? can't you just
use 'switch' and end up with more readable code? couldn't we call it
'match'? is the lack of an sh-like '~' a personal preference of the
author, or just not feasible to implement due to rc's eval-once
semantics?

I know i probably ought to be quiet and retrain my fingers, but old
habits die hard. if i can't patch rc for this, how can i set up
readline to get along with it? my problem is that readline will do tab
completion on ~/wwwd<TAB> if i have a directory in my home called
wwwdocs. but it *won't* do anything with $home/wwwd<TAB>, presumably
since rc is not telling it what's in $home. i note that if I use bash,
$HOME/wwwd<TAB> magically becomes '/home/decklin/wwwdocs/'. bash must
know how interact a little more closley with readline. While this sort
of sets off my bloat detector, it's better than typing a ~, doing tab
completion, and then going back and changing it to $home.

One other thing - is there a replacement for the '~user' idiom? What's
the rc way? grep through /etc/passwd?

-- 
Decklin
Written with Debian GNU/Linux - http://www.debian.org/


             reply	other threads:[~1999-12-09  8:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-09  7:52 Decklin Foster [this message]
1999-12-09  8:26 ` Markus Friedl
1999-12-09  8:52 ` Gert-Jan Vons
1999-12-09 14:20   ` Decklin Foster
1999-12-09 16:48   ` Paul Haahr
1999-12-09 16:27 ` Mark K. Gardner
1999-12-09 22:08 ` kim kubik
1999-12-10  7:45 Byron Rakitzis
1999-12-10  9:32 ` Gert-Jan Vons

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=19991209025205.B305@debian \
    --to=fosterd@hartwick.edu \
    --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).