Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Is it possible to clear empty :-tied elements?



On Tue, Jul 19, 2022 at 12:55 PM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> export -UT CMAKE_PREFIX_PATH="$ZPFX:$CMAKE_PREFIX_PATH" cmake_prefix_path
>
> The problem is that the variable/array will contain empty element if the variable is empty when export is run.

Perhaps this is most easily done with

export -UT CMAKE_PREFIX_PATH="${ZPFX:+$ZPFX:}$CMAKE_PREFIX_PATH"
cmake_prefix_path

??




Messages sorted by: Reverse Date, Date, Thread, Author