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

Re: Feature request – substitutions similar to +, -, :+, :-



On 18 Nov 2017 at 19:05:25, Sebastian Gniazdowski (psprint@xxxxxxxxxxx) wrote:
> echo "I'm ${${theme[use-name]:&Patrick}:-a subscriber}, hello."

Just realized that with the description of :& I gave, this would work the same, except not only for "1", but any non-empty string:

echo "I'm ${${theme[use-name]:+Patrick}:-a subscriber}

So it's a matter of getting consensus on details of :& and :^. Sorry that I don't have access to my revelations of how good boolean test would be. I've had them when was writing code, if I get some again I'll send them.

-- 
Sebastian Gniazdowski
psprint /at/ zdharma.org



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