less 376 : can't view regular files with less : ghort@ghort666:~> less BnetLog.txt I only see Exit 1 ghort@ghort666:~> file -L BnetLog.txt BnetLog.txt: ASCII text ghort@ghort666:~> setenv | grep LESSOPEN LESSOPEN=|lesspipe.sh %s ghort@ghort666:~> which lesspipe.sh /usr/bin/lesspipe.sh The bug is in lesspipe.sh The problem is that if file has no extension, or not extension known by lesspipe.sh, it has to be an elf executable to be viewed through less... A quick fix would be change line 36 of lesspipe.sh from : "$FILE1" = "ELF" -o "$FILE2" = "ELF" ] && strings $1 ;; to : "$FILE1" = "ELF" -o "$FILE2" = "ELF" ] && strings $1 || cat $1;; With that fix, I've got less working fine now ... Arnaud
did you try less 378 ?
How ? in emerge -s less only less 376 seems to be available ...
env ACCEPT_KEYWORDS="~x86" emerge -s less
it's exactly the same with less 378 Arnaud
less seems to work perfectly fine here, maybe I don't understand your problem?
After many tests, I've understood what happened... I had to reinstall gentoo (many times) and couldn't reproduce that bug. we can close this bug as it certainly was caused by a mistake I did, go on reading for an explanation... less /path_to_file on invocation calls lesspipe.sh /path_to_file. if lesspipe.sh outputs nothing, less opens itself the file /path_to_file, otherwise it outputs the output of lesspipe.sh. lesspipe.sh is run by sh, which is an alias to bash. Bash when invoked by sh (I mean by the way of the alias), doesn't source anything (like .bashrc, see man bash). .bashrc script shouldn't output anything (this i a general rule, see .bashrc comments). My .bashrc was printing something, that's why less didn't output the file, but strange messages.... Now the question is why did bash source .bashrc as it shouldn't ? Maybe there is a new version of bash until that ? at least now, it works perfectly. Sorry folks ! Arnaud
I tried and tried to reproduce with no result, glad you figured it out :)