[dolphin] [Bug 464460] Support environmental variables in Places

Michael Mikowski bugzilla_noreply at kde.org
Tue Jan 24 02:33:32 GMT 2023


https://bugs.kde.org/show_bug.cgi?id=464460

Michael Mikowski <z_mikowski at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |z_mikowski at yahoo.com

--- Comment #2 from Michael Mikowski <z_mikowski at yahoo.com> ---
Felix, I generally agree with your sentiment.  However, I do think there is
some value here for your consideration.

Honestly, just support for a small subset like HOME and USER might be a good
first step. I did this with qwe bash bookmarks app
(https://github.com/olafurw/qwe), and now users can share a config file, which
is very handy. I would suggest only support of UPPER_CASE variable names using
brace expansion and a YAML escape back slash like so:

<bookmark href="file:///\${HOME}/Data/\${CURRENT_YEAR}"> ...

1. Conflicts with literal labels issue: Probably mitigated by escaped
bash-style brace expansion.
2. Use Cases: 1. Users create config files that can be shared without
modifications; 2. Developers can rely on static configs that do not need to be
rewritten for every user; 3. Apps can abstract a greater number of default
settings through a central default config expressed in $XDG_CONFIG_DIRS. 
3. Bookmarks can be changed via scripts :  yes, but this hard-codes configs and
does not capture intent like environment variable expansion can. Rewriting is
pretty much a hack to get around that intent isn't captured.
4. Cost vs. benefit: I defer to you on that. I did want to illustrate, however,
that I do certainly see some benefit. Using the escape character might mitigate
much of the risk. Admittedly, environment variable are often not set in various
contexts, so perhaps just a very limited subset as discussed above would be a
good start.

I hope that is useful.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list