From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: zfcd_match erratic on some awks
Date: Tue, 4 Apr 2000 13:17:13 -0400 [thread overview]
Message-ID: <20000404131713.A25031@dman.com> (raw)
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
reply other threads:[~2000-04-04 17:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20000404131713.A25031@dman.com \
--to=schizo@debian.org \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).