Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _canonical_path not working on *BSD
- X-seq: zsh-workers 24744
- From: Peter Stephenson <pws@xxxxxxx>
- To: Baptiste Daroussin <baptiste.daroussin@xxxxxxxxx>
- Subject: Re: _canonical_path not working on *BSD
- Date: Wed, 26 Mar 2008 15:34:09 +0000
- Cc: zsh-workers@xxxxxxxxxx, Pea <zsh@xxxxxxxxxxxx>
- In-reply-to: <20080326162710.20476ooqf5nlulwc@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080326114413.80713vrmznwpnyuc@xxxxxxxxxxxxxxx> <20080326150552.52b3f1c4@news01> <20080326162710.20476ooqf5nlulwc@xxxxxxxxxxxxxxx>
Baptiste Daroussin wrote:
> This only work on OpenBSD, readlink on FreeBSD doesn't allow -f.
I think that means the function won't do what it's designed to do,
right? So in that case we should test if readlink accepts -f and if it
doesn't, then return immediately. However, that may not be a trivial
test. How about something like
[[ -n $(readlink -f / 2>&1 >/dev/null) ]]
(for which we could cache the result)? Or is testing that
"readlink -f / >&/dev/null" returns status 0 good enough?
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author