Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug in syntax check
- X-seq: zsh-workers 38596
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Bug in syntax check
- Date: Sat, 04 Jun 2016 05:13:54 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=QGO1Dw5LT4CQNDtSnqTqqO9ReBo7FjrLwMsMNI789Gk=; b=XqQp4qVQvvN7N0d8L2CBq2xhzZVFHK+71u6uwGLCcYdcLH4CgCkiDphp0NB1UDUR6A Chn7HLys+sviQrgbZ4r91T9qm6q+ho90ENy/kZgRrSJ7kagLYgAeWK7J/xkvV/jj/cQG c2yGqbunZCetG8OEWIpjwpU/AQIWSSf9VFr8espC2YOcpRMd9UMvY0kUcEfPpvEvKrNs 5k4G1ApA13JLFU0syOg73G0oFNMBu/aFdhjYnBMs867AWwCrHy8JExi7AuHHTkO8Opt5 ujr3ST28p2Dn+jmcJ4nCuy11V7rEO/J94tNP0+64FBP8a12voIXcUcZjGoFnj76GtxDI V5uw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
The following script works fine, but when run with 'zsh -n' the syntax
checker returns an error:
6: no such user or named directory: tmp
Ideally the checker should know that the named directory was set in the
same script (it doesn't check the ones in the environment either), but at
the very least it shouldn't check the named directories at all.
It's better to not check anything that throw bad errors.
Cheers.
---
#!/bin/zsh
emulate sh
hash -d tmp=/tmp
hash -d test=~tmp/test
echo ~test
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author