Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _canonical_path not working on *BSD
- X-seq: zsh-workers 24766
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: _canonical_path not working on *BSD
- Date: Thu, 27 Mar 2008 08:39:11 -0700
- In-reply-to: <20080327102325.55808716@news01>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080326114413.80713vrmznwpnyuc@xxxxxxxxxxxxxxx> <080326083638.ZM16858@xxxxxxxxxxxxxxxxxxxxxx> <200803261540.m2QFeJmm017381@xxxxxxxxxxxxxx> <200803261604.m2QG41Ke017772@xxxxxxxxxxxxxx> <200803261621.m2QGLptV017966@xxxxxxxxxxxxxx> <20080326173824.0a55c00d@xxxxxxxxxxxxxxxxxxxxxx> <20080326164615.1d5893ed@news01> <20080327102325.55808716@news01>
On Mar 27, 10:23am, Peter Stephenson wrote:
}
} I should make one more point about this before leaving the subject: this
} doesn't do everything that "readlink -f" does, in particular it doesn't
} remove .. path segments, strip multiple /'s or remove symbolic link
} references in intervening directories.
}
} Luckily, we have the technology, I think.
}
} We don't need the $(...) for the zstat. It would be quite nice to
} be able to get the directory canonicalization without a fork, too.
Why do we even need the zstat if we're doing $(cd ...; pwd) ? I used
zstat in the first place to avoid having to cd to a directory that might
not be readable/executable (though I suppose "umount" would normally be
used by root) but if you're going to cd anyway then you can skip the
whole "while" loop on zstat and just "pwd -P" once.
Or better, try the "pwd -P" first and fall back on the while loop.
(Or did your most recent patch do that? I've lost track.)
I'm beginning to think this whole exercise is a bad idea anyway. I have
visions of sysadmins attempting to umount a misbehaving NFS server or a
failing disk and ending up with their session frozen as zsh attempts to
access the bad filesystem behind the scenes.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author