diff --git a/cli/kdeconnect-cli.cpp b/cli/kdeconnect-cli.cpp index fa2bd839d..3096629b8 100644 --- a/cli/kdeconnect-cli.cpp +++ b/cli/kdeconnect-cli.cpp @@ -53,7 +53,7 @@ int main(int argc, char** argv) parser.addOption(QCommandLineOption(QStringLiteral("lock"), i18n("Lock the specified device"))); parser.addOption(QCommandLineOption(QStringLiteral("send-sms"), i18n("Sends an SMS. Requires destination"), i18n("message"))); parser.addOption(QCommandLineOption(QStringLiteral("destination"), i18n("Phone number to send the message"), i18n("phone number"))); - parser.addOption(QCommandLineOption(QStringLiteral("attachment"), i18n("File urls to send attachments with the message"), i18n("file urls"))); + parser.addOption(QCommandLineOption(QStringLiteral("attachment"), i18n("File urls to send attachments with the message (can be passed multiple times)"), i18n("file urls"))); parser.addOption(QCommandLineOption(QStringList(QStringLiteral("device")) << QStringLiteral("d"), i18n("Device ID"), QStringLiteral("dev"))); parser.addOption(QCommandLineOption(QStringList(QStringLiteral("name")) << QStringLiteral("n"), i18n("Device Name"), QStringLiteral("name"))); parser.addOption(QCommandLineOption(QStringLiteral("encryption-info"), i18n("Get encryption info about said device"))); @@ -261,7 +261,7 @@ int main(int argc, char** argv) const QString message = parser.value(QStringLiteral("send-sms")); - const QStringList rawAttachmentUrlsList = parser.value(QStringLiteral("attachment")).split(QRegularExpression(QStringLiteral("\\s+"))); + const QStringList rawAttachmentUrlsList = parser.values(QStringLiteral("attachment")); QVariantList attachments; for (const QString& attachmentUrl : rawAttachmentUrlsList) { diff --git a/cli/kdeconnect.zsh b/cli/kdeconnect.zsh index 15ae27cee..45464af0e 100644 --- a/cli/kdeconnect.zsh +++ b/cli/kdeconnect.zsh @@ -44,4 +44,5 @@ _arguments -s \ $blockoperations"--photo=[open the connected device's camera and transfer the photo]:file:_files" \ + 'sms' \ '(operation)--send-sms=[send an SMS]:message:' \ - '(operation)--destination=[specify phone number to send the SMS to]:phone number:' + '(operation)--destination=[specify phone number to send the SMS to]:phone number:' \ + '(operation)*--attachment=[attachment to send with the message]:file:_files'