shabble / irssi

Personal Fork of Irssi IRC client
Other
7 stars 2 forks source link

add new variable type `$?` #18

Open shabble opened 12 years ago

shabble commented 12 years ago

Add a new type of variable expansion, of the form $?name.

It should work similarly to $@ or $#, but should expand to:

nothing (empty string) if $name contains only whitespace, the value of $name, if $name actually has content.

Can be used to replace $cumode/cumode_space, and allow optional `msgnick = "$0 $1-" user mode in messages.

shabble commented 12 years ago

https://github.com/shabble/irssi/blob/master/src/fe-common/core/fe-messages.c#L141 takes care of the thing I was originally thinking.

Still not entirely useless though (maybe?)