Argument Query get all

Hey there.

Currently I have this:

$(eval '$(1)' === 'null' ? 'https://testlink.com/market' : 'Market for $(1): https://testlink.com/market?filter=$(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:

https://testlink.com/market?filter=Argument1+Argument2+Argument3

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

1 Like

Hey @Pxl_Monarch!

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

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

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

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.