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    co...@ccil.org    http://ccil.org/~cowan
Half the lies they tell about me are true.
        --Tallulah Bankhead, American actress

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to