Set rc_dir based on W3M_DIR environment variable.

By default, w3m puts all of its data in the `~/.w3m/` directory
(creating it as necessary). This was not configurable in any way.

This commit adds some quick reconfigurability -- when the "W3M_DIR"
environment variable is set, w3m will use that location instead. The
default location is unchanged.

Fixes #130.
This commit is contained in:
Yash Lala
2021-12-11 22:37:52 -08:00
parent 2b59b9eb0a
commit 26284ff627
4 changed files with 80 additions and 28 deletions

View File

@@ -266,9 +266,16 @@ $ w3m \-v
.EE
.\".SH Errors
.SH ENVIRONMENT
\fIw3m\fP recognises the environment variable WWW_HOME as defining a
fallback target for use if it is invoked without one.
\fIw3m\fP recognises the environment variable \fBWWW_HOME\fP as
defining a fallback target for use if it is invoked without one.
If the \fBW3M_DIR\fP environment variable is set to a directory
name, \fIw3m\fP will store its user files there instead of
under the ~/.w3m directory.
.SH FILES
The default locations of some files are listed below. These
locations can be altered via the \fBW3M_DIR\fP environment
variable.
.TP
\f(CW~/.w3m/bookmark.html\fP
default bookmark file