mons installs a helper library called libshlist. Its list_insert operation does not work with BSD sed 'i'.
$ echo 1 2 3 | sed '1ifoobar' # BSD sed
sed: 1: "1ifoobar": command i expects \ followed by text
$ echo 1 2 3 | gsed '1ifoobar' # GNU sed
1 2 3
$ echo 1 2 3 | sed '1i\
foobar ' # BSD sed again
foobar 1 2 3
Aliasing sed to gsed on FreeBSD (and adding a port dependency on gsed) fixes it; currently I've hacked in a:
definition to my copy of mons so that it works.
(This manifests as "mons" producing the sed error message above ("command i expects \ followed by text"), and then printing Monitors: 0 and some gibberish.)
Im seeing this as well, Ill work on getting an update to the port to fix this since I still very much enjoy using this tool.
For others reference there is an open issue on github as well: https://github.com/Ventto/mons/issues/30
Awesome, thanks Robert.
Submitted a PR for fixing the sed issue: https://github.com/Ventto/libshlist/pull/2 and included a small set of tests to make sure we can easily validate this for changes in the future. Once thats merged well update mons and its refs in the port.
Also has an issue with the "command -pv xrandr" for mons so I opened this related issue as well: https://github.com/Ventto/mons/pull/44
Should we just generate the patches for mons since upstream the maintainer seems to be unresponsive? Seems to be our best option until gets around to review it.