(I am talking about things like ${var:-default value})

I have long wished there was a substitution for "substitute a string if var is 
unset
else substitute nothing".  This would basically be the inverse of :+, which 
means
substitute a string if the var is set (ignoring the actual value of the 
variable)
else substitute nothing.  It is also similar to (but obviously not the same as) 
:-,
which means substitute a string if var is unset, else substitute the value of 
the
variable.

In fact, even better would be a generalized if-then-else, so you could do 
something
like:

    echo ${var*var is set to $var*var is not set}

(for some as yet unused character - I note that * is currently in that category)

Any chance for any of this to be implemented?

=================================================================================
Please do not send me replies to my posts on the list.
I always read the replies via the web archive, so CC'ing to me is unnecessary.

When responding to my posts, please try to refrain from giving bureaucratic 
answers.
If you have nothing useful to say, then just click Next and go on.

Reply via email to