Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Another patch to compctl-examples CVS compctl, and a bug?
- X-seq: zsh-workers 1640
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Another patch to compctl-examples CVS compctl, and a bug?
- Date: Sat, 13 Jul 1996 18:55:45 -0700
- Cc: bobg@xxxxxxxxxxx
- In-reply-to: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> "Another patch to compctl-examples CVS compctl, and a bug?" (Jul 13, 5:34pm)
- References: <960713173425.ZM5697@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
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