Closed SPFabGerman closed 3 years ago
Yeah, there should have been a $1
. I originally had this code in the getCurSink
function and later moved it to getSinkName
because I think it makes more sense there. And I didn't noticed the inconsistency when I copy-pasted the code. Haha.
So yeah, that is fixed now.
I also don't know what the better solution for getting the port name is. Yours looks like it is a bit more portable than mine, but I don't really know. But, yeah, maybe I was a bit to focused on creating a one-liner solution to getting the current port name.
No problem, thanks again for the PR. Merging this!
I added the ability to give nicknames to different ports. This is simmiliar to #32, but I think my version has several improvements.
First it is based upon current master. Second it remains backwards compatible with the old
sinkname
format. The format for both a sinkname and a portname issinkname/portname
. If a portname is specified, this rule takes precedence over rules with no portname specified. There is one downside of my implementation though: thesed
command uses syntax, which is only available in the GNU version ofsed
. (At least this is what it says in the manpage.) I don't know how big of an issue this is for you. I also couldn't really find a solution that uses less commands, but maybe anawk
script would be good here, but I don't really know muchawk
.I also haven't added any documentation for that yet, but that should not be a problem.