Bug 105865

Summary: lessecho does not quote arguments with spaces.
Product: [openSUSE] SUSE Linux 10.1 Reporter: Forgotten User OS1JNCFbCX <forgotten_OS1JNCFbCX>
Component: BasesystemAssignee: Michal Marek <mmarek>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Alpha 4   
Target Milestone: ---   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User OS1JNCFbCX 2005-08-19 14:41:50 UTC
Man page for lessecho claims: "... any argument containing spaces is enclosed in
quotes."

Actually this is not true:

$ lessecho 'gg gg'
gg gg
$ 

Actually you must explicitly specify space character as an escape character to
make it work:

$ lessecho -m' ' 'gg gg'
gg\ gg
$
Comment 1 Petr Mladek 2005-09-13 14:31:44 UTC
reassigned to the new maintainer
Comment 2 Forgotten User OS1JNCFbCX 2005-12-17 17:24:14 UTC
Still broken in 10.1 Alpha4.
Comment 3 Michal Marek 2005-12-19 10:33:38 UTC
I think this is rather a bug in the documentation, because lessecho is
only used internally by less and is passed -n0x20 by it. Try

    cat /etc/SuSE-release | strace -eexecve -f -o strace less

and type '-otest' in less. Then you can see something like that in the
strace file:

10490 execve("/usr/bin/lessecho", ["lessecho", "-p0x22", "-d0x22", "-e\\", "-n0x3b", "-n0x20", "-n0x2a", "-n0x3f", "-n0x9", "-n0xa", "-n0x27", "-n0x22", "-n0x28", "-n0x29", "-n0x3c", "-n0x3e", ...], [/* 91 vars */]) = 0
 
So unless you  give me a good reson to modify the behaviour of lessecho, I'll
just change its man page (which was written ex post anyway, so it should match
the behaviour of lessecho and not vice versa).
Comment 4 Forgotten User OS1JNCFbCX 2005-12-19 12:43:43 UTC
Changing the man page in a way that it reflects the actual behaviour is an appropriate solution as well from my point of view.
Comment 5 Michal Marek 2006-01-02 10:09:54 UTC
Fixed in openSUSE Factory (yes I know about the "bellow" typo ;-)).