D9059: Don't require the device parameter for kdeconnect-cli with one device

Albert Vaca Cintora noreply at phabricator.kde.org
Thu Dec 7 17:07:26 UTC 2017


albertvaka added a comment.


  I like what Android's ADB does: there is a command line argument that means "connect to the only device", but you have to manually specify it.
  
    -d         use USB device (error if multiple devices connected)
  
  I would do this and make it work only if one device is *paired* (not connected, otherwise you might end up sending commands to the wrong device).
  
  It could be something like `-s, --single-device       automatically connect to the only device paired (fails if paired to multiple devices)`.
  
  I like this approach better than doing it by default, and would happily accept the patch, otherwise I think it could be a 'footgun'. If we don't make it explicit and you don't know you have to specify the device, you might have some scripts that just work with one device paired, and then break when you pair a second device without understanding why.
  
  What do you think?

REPOSITORY
  R224 KDE Connect

REVISION DETAIL
  https://phabricator.kde.org/D9059

To: mtijink, #kde_connect
Cc: albertvaka, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20171207/b5110c2c/attachment.html>


More information about the KDEConnect mailing list