Travis Siegel dixit:
> Apparently, some unix variants still sim-link more to less (or vice
Quite surprising, but indeed.
MirBSD *does* hardlink them…
289727 -r-xr-xr-x 3 root bin 75444 Jul 14 2012 /usr/bin/less*
289676 -r-xr-xr-x 1 root bin 15052 Jul 14 2012 /usr/bin/lesskey*
289727 -r-xr-xr-x 3 root bin 75444 Jul 14 2012 /usr/bin/more*
289727 -r-xr-xr-x 3 root bin 75444 Jul 14 2012 /usr/bin/page*
… and ships more(1) only in the installer, where size is
paramount to fit into a floppy disc.
(It also ships another more implementation in .mkshrc; the current
implementation is extremely tricky, but this boils down to:
function smores {
set +e
local line llen curlin=0 x
cat "$@" | while IFS= read -r line; do
llen=${%line}
(( llen != -1 )) || llen=${#line}
(( llen = llen ? (llen + COLUMNS - 1) / COLUMNS : 1 ))
if (( (curlin += llen) >= LINES )); then
print -nr -- $'\e[7m--more--\e[0m'
read -u1 x || return $?
[[ $x != [Qq]* ]] || return 0
curlin=$llen
fi
print -r -- "$line"
done
}
This isn’t exactly traditional more(1) but close enough. Note the Korn
shell restores the previous set ±e state upon function exit.)
bye,
//mirabilos
--
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh
_______________________________________________
Lynx-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lynx-dev