Use wordexp to resolve variables like $HOME in path like settings #1215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #1173 - in combination with #1210
This is a spin-off of #1210 to properly handle environment variables for defining path like variables.
Open questions:
wordexp
?0
(like e.g. i3wm does) - allows for a maximum of flexibility. E.g. the output of a script could be used to set the variable (default_icon = $(some_random_command)
), but this also allows for arbitrary code execution.WRDE_NOCMD
- prohibits expansion of commands, but allows for all variables - even undefined ones.WRDE_NOCMD | WRDE_UNDEF
- strictest way of expansion, which ignores undefined variablesLOG_W
enough to inform user of failed expansion? Should this be more detailed wrt. kind of failure?