On Mon, 28 Nov 2022 at 00:01, Alejandro Colomar <alx.manpa...@gmail.com> wrote: > On 11/27/22 12:41, Alexey wrote: > > On 2022-11-26 21:45, Alejandro Colomar wrote:
> > I could suggest you to use for clarity another construction: > > [[ ${1+isset} ]] || echo "not set" > > Here "isset" is just for readability. You could place any other string > > literal > > there. > I actually find that very confusing. What feature is it using? I couldn't > find > it with `info bash | less` then `/\+`. See: https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion - Under heading: ${parameter:+word} - The parameter is 1 - The word is isset - The colon ':' is optional, explained by the sentences beginning with "Omitting the colon" ..