w3m
w3m copied to clipboard
Allow w3m -dump w3m://options-setting-panel
This page,
Information about current page
Title Option Setting Panel
needs a pseudo-url, like chrome://
, maybe w3m://options-setting-panel
, or maybe indeed chrome://.. or about: like Firefox.
That way we could do
$ w3m -dump w3m://options-setting-panel
to non-interactively get a list of options, and their current values.
Yes there is
$ w3m -show-option
but that just shows their names, not current values.
And then there is "o", but that is interactive.
I want batch-job methods.
OK, I made this script,
#!/bin/sh
# Let's compare the my options of w3m vs. default.
set -eu
t=/tmp/test_w3m
mkdir -p $t
cd $t
set mine default
for i in mine default
do
if test -f $i; then rm $i; fi
case $i in default) h=/tmp;; *) h=$HOME;; esac
xdotool sleep 3 type oS$t/$i && xdotool key Return key q &
HOME=$h w3m -o confirm_qq=0 file:$t
done
diff $t/* || :
Yes, we could just look in ~/.w3m to see our settings, but we want actual proof of their current values. Accessible non-interactively (programmaticly.)