Argument Query get all

Hey there.

Currently I have this:

$(eval '$(1)' === 'null' ? '' : 'Market for $(1):$(1)')

But what I want is people to be able to type more than one word.
I want the command to fetch all and seperate them by +
So the link would look like:

Can someone pls help fitting this into the command :slight_smile: ?

Hey @Pxl_Monarch!

Replace $(1) with $(query), then replace $(query)'s spaces with +:

$(eval const q = '$(query)'.replace(/\s/g, '+'); q === '' ? '' : `Market for $(query):${q}`)
1 Like

Thank you Emily!
Especially const q = '$(query)'.replace(/\s/g, '+'); q === '' was very very helpful! Thank you a lot.

1 Like