Would you consider adding support for looking in $XDG_DATA_DIRS and the paths listed in $XDG_DATA_HOME for fortunes? This would allow fortunes to be put in places other than the directories that are built into the binary, and allow them to use used without specifying the path to them.
Specific usecases include:
I'm happy to help implement this, just kinda want your thoughts on it first before I go ahead.
Would you consider adding support for looking in $XDG_DATA_DIRS and the paths listed in $XDG_DATA_HOME for fortunes? This would allow fortunes to be put in places other than the directories that are built into the binary, and allow them to use used without specifying the path to them.
Specific usecases include:
allowing users to add their own personal fortunes and use them without needing to specify the path -- e.g. creating
~/.local/share/fortunes/myfortunesand runningfortune myfortunesadding fortunes when can't write to the default fortune dirs e.g. on multi-user systems, on systems with read-only filesystems
more info about those vars: https://wiki.archlinux.org/title/XDG_Base_Directory#Specification
specification: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
I'm happy to help implement this, just kinda want your thoughts on it first before I go ahead.