zsh-workers
 help / color / mirror / code / Atom feed
* zcompile dir oddity with unmatched `
@ 2011-03-05  0:37 Phil Pennock
  2011-03-05  8:54 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Pennock @ 2011-03-05  0:37 UTC (permalink / raw)
  To: zsh-workers

I was working on a prompt adjustment, ran zsh, got:
% zsh
update_zcompile_dirs:14: unmatched `
update_zcompile_dirs:zcompile:4: can't read file: /home/pdp/bin/zsh-funcs

Okay, reduce to:
% zcompile /home/pdp/bin/zsh-funcs 
zsh: unmatched `
zcompile: can't read file: /home/pdp/bin/zsh-funcs

Moved new functions out of dir, no difference.

% cd ~/bin
% mkdir N
% zcompile N
% for f in zsh-funcs/*; do print $f; cp $f N; zcompile N; done 
[ 8 items go in, before a problem, which then disappears with the 9th
  item; reappears with 23rd item, disappears again ]
% zcompile N
% diff -ur zsh-funcs N
Only in zsh-funcs: .svn
% cp -pR zsh-funcs/.svn N
% zcompile N
% diff -ur zsh-funcs N
% zcompile N          
% zcompile zsh-funcs 
zsh: unmatched `
zcompile: can't read file: zsh-funcs
% mv zsh-funcs zsh-funcs-X
% mv N zsh-funcs
% zcompile zsh-funcs
% zcompile zsh-funcs-X
zsh: unmatched `
zcompile: can't read file: zsh-funcs-X
%

In the middle there, I updated system zsh from 4.3.10 to 4.3.11 and it
had no impact.

% fgrep -r '`' zsh-funcs
zsh-funcs/fix-home-svn-perms:   if ! test ".`/bin/pwd`" = ".$master_dir"
zsh-funcs/.svn/text-base/fix-home-svn-perms.svn-base:   if ! test ".`/bin/pwd`" = ".$master_dir"
%

Something hinky; I don't have time to investigate further right now, so
throwing this out in case someone else has seen this and knows what
might be happening.

FreeBSD/amd64

-Phil


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

* Re: zcompile dir oddity with unmatched `
  2011-03-05  0:37 zcompile dir oddity with unmatched ` Phil Pennock
@ 2011-03-05  8:54 ` Bart Schaefer
  2011-03-05 22:16   ` Phil Pennock
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2011-03-05  8:54 UTC (permalink / raw)
  To: zsh-workers

On Mar 4,  7:37pm, Phil Pennock wrote:
}
} % cd ~/bin
} % mkdir N
} % zcompile N

Hang on a minute.  The zcompile builtin doesn't accept directory names
as arguments:

schaefer<507> cd /tmp 
schaefer<508> mkdir N
schaefer<509> zcompile N
zcompile: can't read file: N

So you must be using a function or script named zcompile which at some
point calls "builtin zcompile"?  Until we know what your wrapper is
doing, I don't think we can be of that much help.

} Something hinky; I don't have time to investigate further right now, so
} throwing this out in case someone else has seen this and knows what
} might be happening.

Does your wrapper use "builtin zcompile -U"?  If not, try that.  If
that solves it, it's a problem with an alias somewhere; that's the
most likely source of zcompile errors.

You noted that:

} % for f in zsh-funcs/*; do print $f; cp $f N; zcompile N; done 
} [ 8 items go in, before a problem, which then disappears with the 9th
}   item; reappears with 23rd item, disappears again ]

As soon as the problem occurs you should check (possibly in another
shell) whether loading the previous (seemingly error-free) zwc file
correctly defines all the compiled functions (e.g., look at the
output of the "functions" command).


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

* Re: zcompile dir oddity with unmatched `
  2011-03-05  8:54 ` Bart Schaefer
@ 2011-03-05 22:16   ` Phil Pennock
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Pennock @ 2011-03-05 22:16 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

On 2011-03-05 at 00:54 -0800, Bart Schaefer wrote:
> On Mar 4,  7:37pm, Phil Pennock wrote:
> }
> } % cd ~/bin
> } % mkdir N
> } % zcompile N
> 
> Hang on a minute.  The zcompile builtin doesn't accept directory names
> as arguments:

Okay, this would be the problem.  I mis-read the man-page back when I
set this up, I'm using BSD where a directory can be opened as a file for
reading and since it normally doesn't error, I never noticed or
revisited my understanding.

I'll nuke the bad logic in my start-up files.  Thanks.

(is still tangentially a -workers issue; zcompile could do with an extra
 stat check)

-Phil


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

end of thread, other threads:[~2011-03-05 22:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-05  0:37 zcompile dir oddity with unmatched ` Phil Pennock
2011-03-05  8:54 ` Bart Schaefer
2011-03-05 22:16   ` Phil Pennock

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).