chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.


From: John Cowan
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Tue, 19 Mar 2013 13:01:07 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

Peter Bex scripsit:

> BTW: This behaviour isn't really compatible with the shell's, since it
> disallows strings formatted like ~username from being expanded to that
> user's homedir.

I don't think that behavior is worth emulating.  For one thing, machines
are far less likely to be multi-user nowadays.  For another, it depends
on the existence of /etc/passwd (or at least the getpwuid() system call),
which does not exist on Windows.  Even on Cygwin, where it does exist,
the home directory fields are just /home/<username>, which is frequently
not the user's value of $HOME at all.

Bash has some nice extensions where ~+/ means $PWD and ~-/ means $OLDPWD,
and if you add a number it refers to an entry in the current directory stack.
But I don't suggest adding that behavior either; I just mention it because
it may help someone sometime.

-- 
John Cowan    address@hidden    http://ccil.org/~cowan
Half the lies they tell about me are true.
        --Tallulah Bankhead, American actress



reply via email to

[Prev in Thread] Current Thread [Next in Thread]