From: Eric Blake <ebb9@byu.net>
To: git@vger.kernel.org
Subject: [patch] cg help broken when $PAGER contains space
Date: Sun, 26 Nov 2006 07:51:24 -0700 [thread overview]
Message-ID: <4569A9EC.6080805@byu.net> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
With cogito 0.18.1, cg-help line 152 invokes "IFS=$'\n' colorize", which
in turn invokes the "pager" shell function from cg-Xlib with IFS set to
just a newline. This means that if PAGER contains any spaces, the
expansion of ${PAGER:-less} within pager() will not be split, leading to
the following less-than-useful help message:
$ echo $PAGER
less -s
$ cg help
/usr/lib/cogito/cg-Xlib: line 193: less -s: command not found
$ echo $?
127
This patch fixes the problem:
2006-11-26 Eric Blake <ebb9@byu.net>
* cg-help: Don't change IFS when invoking pager.
diff --git a/cg-help b/cg-help
index c2d558f..f428767 100755
- --- a/cg-help
+++ b/cg-help
@@ -149,7 +149,7 @@ BRANCH_COMMANDS="$(ls "$bin_path"/cg-bra
TAG_COMMANDS="$(ls "$bin_path"/cg-tag* | sed 's#.*/##' | tr '\n' ' ')"
ADVANCED_COMMANDS="$(ls "$bin_path"/cg-admin-* | sed 's#.*/##' | tr '\n'
' ')"
- -IFS=$'\n' colorize <<__END__
+colorize <<__END__
The Cogito version control system $(cg-version)
Available regular commands:
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFaanr84KuGfSFAYARAmfSAKCZ15/oq3rwsPyB/XLNXpUWYzQRiACfeYcC
DFw8ldbHVYs0vZtjynI3/hU=
=rR/p
reply other threads:[~2006-11-26 14:53 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=4569A9EC.6080805@byu.net \
--to=ebb9@byu.net \
--cc=git@vger.kernel.org \
/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.
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).