Hi there
I wrote a simple command line tool to play a web radio from the command line using ffmpeg's ffplay :
https://github.com/hotnuma/radio
It uses a config file containing web radios like so :
Code:
[elettrica]url=https://nr8.newradio.it/proxy/apselett?mp=/streamvolume=50[mizrahit]url=https://mzr.mediacast.co.il/mzradio[sabrosita]url=https://playerservices.streamtheworld.com/api/livestream-redirect/XEPHAMAAC.aacaf=acompressor=mode=upward:threshold=-8dB:ratio=2:knee=2.82:attack=6:release=60,volume=60/100To play a radio I do for example :
Code:
radio elettricaIt will play that excellent Italian radio.
I managed to write a simple bash completion file like this :
https://raw.githubusercontent.com/hotnu ... radio.comp
And here is the question.
How is it possible to have a completion that works for stations names. So that if I type radio el<TAB> it would complete with elettrica
I assume I would have to generate a keyword list from config sections, like so :
elettrica mizrahit sabrosita
I'm blocked here, I've no idea how I can do that.
If anyone has an idea, it would be very helpful.
Thanks in advance.
Statistics: Posted by hotnuma — 2026-01-21 17:37