cli suggestion: don't require --modem parameter if there's only one modem available
My laptop has only a single WWAN module, as I would imagine is the common case. Nevertheless, a lot of mmcli
commands require the --modem=<MODEM>
option.
Unfortunately the modem index increments every time I suspend my laptop, so I can't simply just commit mmcli -m 0
to muscle memory. So whenever I would like to use mmcli
, I first need to check what the index currently is, which does seem a bit pointless.
My suggestion is therefore that the use of --modem
is made optional if there is only one modem in the system.
I can work around it by wrapping mmcli
in a bash function, like so:
function mmcli {
modem=$(command mmcli --list-modems --output-json | jq -r '.["modem-list"][0]')
command mmcli --modem $modem "$@"
}
...but it does feel a bit hacky, and I think it would have been nicer if this kind of functionality was built in mmcli
natively.