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

Re: join a string with a parameter value if it's not empy



> p='value' -> result: 'value_string'
> p='' -> result: 'string'

A variation of your first solution:

$p${p:+_}string

I don't see how it could be significantly simpler than this.

--
Sent with HEY


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