Closed topazape closed 3 years ago
po 26. 4. 2021 v 4:00 odesílatel topazape @.***> napsal:
Would it be possible to respect the XDG specification for config and history files generated by locating them in ${XDG_CONFIG_HOME}/pspg/pspgconf and ${XDG_CACHE_HOME}/pspg/pspg_history rather than in $HOME?
Technically there is not any problem. But pspg is a twin of psql, and what I know psql does not follow XDG. So there can be inconsistency. I am not sure how much XDG is widely used.
For example, XDG_CONFIG_HOME and XDG_CACHE_HOME are not supported on my really fresh Fedora 34
@.*** pspg-master]$ set|grep XDG XDG_CURRENT_DESKTOP=GNOME XDG_DATA_DIRS=/home/pavel/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/ XDG_MENU_PREFIX=gnome- XDG_RUNTIME_DIR=/run/user/1000 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=gnome-xorg XDG_SESSION_TYPE=x11 local -a dirs=(${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions); for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share};
So XDG support can have a lot of issues.
I am not an expert on this area - What benefits are when XDG is supported and what negatives when not?
—
You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/okbob/pspg/issues/166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO43Z4SAKRXT7BEGDN6DTKTCMFANCNFSM43R5KT4A .
Thanks for your reply.
$HOME
to standardize paths and make logical groupings.Although psql
does not follow the XDG, it is possible to control the placement of
configuration and history files by using environment variables ($PSQLRC
and $PSQL_HISTORY
).
Since pspg
is a great software, if it is a twin of psql
, can it also support configuration file placement
by environment variables?
Thank you,
I introduced variables PSPG_CONF and PSPG_HISTORY https://github.com/okbob/pspg/commit/37943a68425b13c64b972a544e5834b580cf943d - please check
I have compiled and run the new version and confirmed that
the environment variables (PSPG_CONF
and PSPG_HISTORY
) are read correctly.
Thank you very much for your quick response!
Would it be possible to respect the XDG specification for config and history files generated by locating them in
${XDG_CONFIG_HOME}/pspg/pspgconf
and${XDG_CACHE_HOME}/pspg/pspg_history
rather than in$HOME
?