* PATCH: zfcd_match erratic on some awks
@ 2000-04-04 17:17 Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2000-04-04 17:17 UTC (permalink / raw)
To: zsh-workers
Seems that behavior for an index of 0 is undefined. While this
works out fine for gawk and Solaris awk, mawk has different ideas
of what to do. This should make everybody happy.
Index: Functions/Zftp/zfcd_match
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfcd_match,v
retrieving revision 1.2
diff -u -r1.2 zfcd_match
--- Functions/Zftp/zfcd_match 2000/04/01 20:49:47 1.2
+++ Functions/Zftp/zfcd_match 2000/04/04 17:15:17
@@ -26,7 +26,7 @@
# to list, but not a glob. Don't ask me why.
# I hate having to rely on awk here.
zftp ls -LF $dir >$tmpf
- reply=($(awk '/\/$/ { print substr($1, 0, length($1)-1) }' $tmpf))
+ reply=($(awk '/\/$/ { print substr($1, 1, length($1)-1) }' $tmpf))
rm -f $tmpf
[[ -n $dir && $dir != */ ]] && dir="$dir/"
if [[ -n $WIDGET ]]; then
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-04-04 17:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-04 17:17 PATCH: zfcd_match erratic on some awks Clint Adams
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).