zsh-workers
 help / color / mirror / code / Atom feed
* Bug in syntax check
@ 2016-06-04  5:13 Felipe Contreras
  2016-06-04  6:46 ` Bart Schaefer
  2016-06-04  6:50 ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: Felipe Contreras @ 2016-06-04  5:13 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-04 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-04  5:13 Bug in syntax check Felipe Contreras
2016-06-04  6:46 ` Bart Schaefer
2016-06-04  6:50 ` Bart Schaefer
2016-06-04  8:38   ` Felipe Contreras
2016-06-04 16:54     ` Bart Schaefer
2016-06-04 10:36   ` Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).