This user here, Larry Lansing, contacted me on the community irc channel because he said he was having issues subscribing to the mailing list. He said that he gets the subscribe email and the successful confirmation that he subscribed but he can't post anything. He does get the emails though. Not sure why he can't post. In any case, this is the email he has been trying to post.
-------- Forwarded Message -------- From: Larry Lansing <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [Fwd: lesspipe warning bug & patch] Date: Tue, 31 Jan 2006 11:38:50 -0500 email message attachment (lesspipe warning bug & patch) -------- Forwarded Message -------- From: Larry Lansing <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: lesspipe warning bug & patch Date: Tue, 24 Jan 2006 17:46:13 -0500 -- "Most people do not really want freedom, because freedom involves responsibility, and most people are frightened of responsibility." -Sigmund Freud
Sorry for sending this to you directly, but petidomo seems to hate me. Despite receiving success messages from the approval system, my messages to the devel list never seem to go through. If you could remedy this, I will to my best to bombard you with patches and new spec files. :) ------------------ I've run into a small snag with 'less' in OpenPKG 2.5.0. Every time I invoke 'lesspipe' directly via the shell, or indirectly via 'less', I get the following warning messages from expr: [EMAIL PROTECTED]:~] lesspipe expr: warning: unportable BRE: `^.*\.\([^.]*\)$': using `^' as the first character of the basic regular expression is not portable; it is being ignored expr: warning: unportable BRE: `^\(.*\)\.[^.]*$': using `^' as the first character of the basic regular expression is not portable; it is being ignored cat: : No such file or directory [EMAIL PROTECTED]:~] less log.txt expr: warning: unportable BRE: `^.*\.\([^.]*\)$': using `^' as the first character of the basic regular expression is not portable; it is being ignored expr: warning: unportable BRE: `^\(.*\)\.[^.]*$': using `^' as the first character of the basic regular expression is not portable; it is being ignored For what it's worth, I'm using OpenPKG's 'expr'. A quick look at the 'lesspipe' shell script confirms that it does perform regular expression matches via 'expr', with a leading carrot in the match strings: ext=`expr "$base" : '^.*\.\([^.]*\)$'` base=`expr "$base" : '^\(.*\)\.[^.]*$'` A quick look at the expr info page confirms that the leading carrot is unnecessary: `STRING : REGEX' Perform pattern matching. The arguments are converted to strings and the second is considered to be a (basic, a la GNU `grep') regular expression, with a `^' implicitly prepended. The first argument is then matched against this regular expression. Here is a simple patch for lesspipe that removes the leading carrots and does not seem to hamper functionality: --- lesspipe.orig 2006-01-24 11:52:04.000000000 -0500 +++ lesspipe 2006-01-24 11:52:12.000000000 -0500 @@ -8,8 +8,8 @@ base="$file" filter="" while [ 1 ]; do - ext=`expr "$base" : '^.*\.\([^.]*\)$'` - base=`expr "$base" : '^\(.*\)\.[^.]*$'` + ext=`expr "$base" : '.*\.\([^.]*\)$'` + base=`expr "$base" : '\(.*\)\.[^.]*$'` case $ext in gz|z|Z ) filter="$filter | gzip -d -c" Kudos for providing such a great system. It's made my day job _much_ easier. Let me know where to send the beer. :) -- Larry Lansing
signature.asc
Description: This is a digitally signed message part