Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _canonical_path not working on *BSD
- X-seq: zsh-workers 24745
- From: Peter Stephenson <pws@xxxxxxx>
- To: Baptiste Daroussin <baptiste.daroussin@xxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: Re: _canonical_path not working on *BSD
- Date: Wed, 26 Mar 2008 15:40:19 +0000
- In-reply-to: <080326083638.ZM16858@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080326114413.80713vrmznwpnyuc@xxxxxxxxxxxxxxx> <080326083638.ZM16858@xxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer wrote:
> On Mar 26, 11:44am, Baptiste Daroussin wrote:
> }
> } _canonical_path is not working on freebsd, it rely on readlink
>
> Try this. I don't actually have any mount points that are symlink
> targets so it's hard to test, but I think this is right:
>
> -if (( ! $+commands[readlink] )); then
> +if ! zmodload -F zsh/stat b:zstat 2>/dev/null; then
That's probably a better solution; it doesn't necessarily work on all
systems, particularly if the shell is statically linked, but it should
be at least as widely applicable as, and easier to test for than,
anything involving readlink.
--
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