11-20-2015, 09:31 PM
Shell can't see %t as a variable
Variables are marked with $t or ${t}
This will do:
"$(mocp --format %title)" - quotes are here because the title can contain spaces and you need a whole title to be a string
here a command (mocp --format %title) output is used
edit
Oh, you want to search wikipedia.
Next will open a browser and run a wiki search query
Special search:
Variables are marked with $t or ${t}
Code:
t="elephant"
/usr/bin/google-chrome-stable %U https://en.wikipedia.org/wiki/$t
This will do:
Code:
/usr/bin/google-chrome-stable %U https://en.wikipedia.g/wiki/"$(mocp --format %title)"
here a command (mocp --format %title) output is used
edit
Oh, you want to search wikipedia.
Next will open a browser and run a wiki search query
Code:
/usr/bin/google-chrome-stable %U https://en.wikipedia.g/wiki/?search="$(mocp --format %title)"
Special search:
Code:
/usr/bin/google-chrome-stable %U http://en.wikipedia.o/wiki/Special:Search?search="$(mocp --format %title)"