this one adds --changelog for 'viewing' rpm files (very convinient!) and adds support for viewing contents of rar files --- /usr/bin/lesspipe.sh~ 2004-01-21 01:29:44.000000000 +0200 +++ /usr/bin/lesspipe.sh 2004-01-21 01:31:13.000000000 +0200 @@ -19,7 +19,8 @@ *.z) gzip -dc $1 2>/dev/null ;; *.Z) gzip -dc $1 2>/dev/null ;; *.zip) unzip -l $1 2>/dev/null ;; - *.rpm) rpm -qilp "$1" 2>/dev/null ;; + *.rpm) rpm -qilp --changelog "$1" 2>/dev/null ;; + *.rar) unrar l "$1" 2>/dev/null ;; *.[1-9] | *.n | *.man) [ "$(file -L $1 | cut -d ' ' -f 2)" = "troff" -o \ "$(file -L $1 | cut -d ' ' -f 2)" = "ASCII" ] && i see varying usage of $1, once quoted, once not, but imho all uses of $1 must be quoted otherwise you cannot see files with spaces. # date |gzip > 'hmm 123.gz' # less hmm\ 123.gz "hmm\ 123.gz" may be a binary file. See it anyway? # date |gzip > 'hmm_123.gz' # less hmm_123.gz Wed Jan 21 01:34:07 EET 2004 hmm_123.gz (END) and please, if you fix the quotes issue, post it to upstream too (wherever you got the original?) since i see this issue in too many distros ;( Reproducible: Always Steps to Reproduce:
Fixed in less-382-r1, thanks!
nice! me being impatient, synced portage and looked lesspipe.sh-r2, and I think this $F needs also quoting: -- strings $F -- also it happens with #!/bin/bash, that you get PIPE error when quiting from viewer: -- line 41: 23247 Broken pipe strings $F -- to reproduce this, do less /bin/ls and hit 'q' this could be silently overcome by sth like this: -- trap 'exit 0' PIPE -- ps: should i reopen bug or just add agriffis@gentoo.org to cc list to get back on this issue? or just posting comment is ok?
Ok, I fixed those issues and bumped the revision of the ebuild to -r2 to push out the changes. Thanks!