2018-02-12 12:00 GMT+09:00 Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>: > 2018-02-12 10:26 GMT+09:00 Nicolas Pitre <nico@xxxxxxxxxxx>: >> On Mon, 12 Feb 2018, Masahiro Yamada wrote: >> >>> 2018-02-11 20:15 GMT+09:00 Nicholas Piggin <npiggin@xxxxxxxxx>: >>> > On Sun, 11 Feb 2018 13:38:04 +0900 >>> > Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> wrote: >>> > >>> >> Is my 'less' insane? >>> >> Or, is this intentional behavior of 'less'? >>> > >>> > Interesting, my less does not do that. Instead of the raw contents >>> > of the file, yours is providing output of `ar tv`, which is >>> > reconstructing more of the archive metadata. I guess it is keyed >>> > on the filename extension. >>> >>> Ah, I see. 'ar tv' and 'less' gave me the same output. >>> >>> >>> > Do you have an alias for it, or maybe the distro patches the tool? >>> >>> I use Ubuntu 16.04 LTS. >>> >>> Not alias'ed >>> >>> $ type less >>> less is hashed (/usr/bin/less) >>> $ /usr/bin/less kernel/built-in.a | head -n 10 >>> rw-r--r-- 0/0 60216 Jan 1 09:00 1970 kernel/fork.o >>> rw-r--r-- 0/0 3648 Jan 1 09:00 1970 kernel/exec_domain.o >>> rw-r--r-- 0/0 20552 Jan 1 09:00 1970 kernel/panic.o >>> rw-r--r-- 0/0 87752 Jan 1 09:00 1970 kernel/cpu.o >>> rw-r--r-- 0/0 34136 Jan 1 09:00 1970 kernel/exit.o >>> rw-r--r-- 0/0 41448 Jan 1 09:00 1970 kernel/softirq.o >>> rw-r--r-- 0/0 40904 Jan 1 09:00 1970 kernel/resource.o >>> rw-r--r-- 0/0 60968 Jan 1 09:00 1970 kernel/sysctl.o >>> rw-r--r-- 0/0 4472 Jan 1 09:00 1970 kernel/sysctl_binary.o >>> rw-r--r-- 0/0 12472 Jan 1 09:00 1970 kernel/capability.o >>> >>> Could be patched by the disto. >> >> What do you get from: >> >> $ echo $LESSOPEN >> >> ? >> > > > You are right. > If I reset LESSOPEN, I got what I expect. > > > $ echo $LESSOPEN > | /usr/bin/lesspipe %s > $ LESSOPEN= less kernel/built-in.a | head -n 10 > !<thin> > // 2964 ` > fork.o/ > exec_domain.o/ > panic.o/ > cpu.o/ > exit.o/ > softirq.o/ > resource.o/ > sysctl.o/ > > If I open /usr/bin/lesspipe, probably this line # Decode file for less case `echo "$1" | tr '[:upper:]' '[:lower:]'` in *.a) if [ -x "`which ar`" ]; then ar tv "$1" else echo "No ar available"; fi ;; -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html