Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Another patch to compctl-examples CVS compctl, and a bug?



On Jul 13,  5:34pm, Bart Schaefer wrote:
} Subject: Another patch to compctl-examples CVS compctl, and a bug?
}
} Now for the bug:  If the ${pref}CVS/Entries file exists, all of this
} works fine.  However, if no CVS directory exists at all, the above
} subsitution prints a newline to the terminal -- which messes up zle.
} The newline is not going into $reply, because using <redisplay> or
} <clear-screen> and then continuing a menu completion cycles through
} the other choices without further zle confusion.
} 
} Where is that newline coming from?
} 
} !     reply=($(for f in \
} ! 		"${${${(f@)$({<${pref}CVS/Entries} 2>/dev/null)}#/}%%/*}" \
} !     		do echo $pref$f; done)
} ! 	   ${pref}*/**/CVS(:h))

There's one too many backslashes in the above.  Take out the one just
before the "do".  With that backslash removed, everything works as
intended.  I still don't know why the extra newline is going straight
to the terminal, but this works:

    reply=($(for f in \
		"${${${(f@)$({<${pref}CVS/Entries} 2>/dev/null)}#/}%%/*}"
		do echo $pref$f; done)
	   ${pref}*/**/CVS(:h))


-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"




Messages sorted by: Reverse Date, Date, Thread, Author