File indexing completed on 2024-04-21 04:56:41
0001 #compdef kdeconnect-cli 0002 0003 _kdeconnect_device-ids() { 0004 local devices='' 0005 devices="$(kdeconnect-cli --shell-device-autocompletion=zsh 2>/dev/null)" 0006 if [[ $? -eq 0 ]]; then 0007 _values "KDE Connect device id" "${(f)devices}" 0008 else 0009 _message -r "No KDE Connect devices reachable." 0010 fi 0011 } 0012 0013 #See http://zsh.sourceforge.net/Doc/Release/Completion-System.html#index-_005farguments for autocomplete documentation 0014 # 0015 #The --desktopfile option is not included, since it rarely makes sense to use 0016 #The --shell-device-autocompletion option is not included, since it's not even in the help (and only required for scripts like these) 0017 local blockoperations="(operation sms)" 0018 _arguments -s \ 0019 '(-)'{-h,--help}'[display usage information]' \ 0020 '(-)--help-all[display usage information, including Qt specific options]' \ 0021 + '(global)' \ 0022 $blockoperations{-l,--list-devices}'[list all devices]' \ 0023 $blockoperations{-a,--list-available}'[list available (paired and reachable) devices]' \ 0024 $blockoperations'--refresh[search for devices in the network and re-establish connections]' \ 0025 {-d=,--device=}'[specify device ID]:id:_kdeconnect_device-ids' \ 0026 {-n=,--name=}'[specify device name]:name' \ 0027 $blockoperations''{-v,--version}'[display version information]' \ 0028 $blockoperations'--author[show author information and exit]' \ 0029 $blockoperations'--license[show license information and exit]' \ 0030 $blockoperations"--my-id[display this device's id]" \ 0031 + '(operation)' \ 0032 $blockoperations'--pair[request pairing with the specified device]' \ 0033 $blockoperations'--ring[find the device by ringing it.]' \ 0034 $blockoperations'--unpair[stop pairing to the specified device]' \ 0035 $blockoperations'--ping[send a ping to the device]' \ 0036 $blockoperations'--ping-msg=[send a ping to the device with the specified message]:message' \ 0037 $blockoperations'--share=[share a file to the device]:file:_files' \ 0038 $blockoperations'--list-notifications[display the notifications on the device]' \ 0039 $blockoperations'--lock[lock the specified device]' \ 0040 $blockoperations'--encryption-info[get encryption info about the device]' \ 0041 $blockoperations'--list-commands[list remote commands and their ids]' \ 0042 $blockoperations'--execute-command=[execute a remote command]:command id' \ 0043 $blockoperations{-k=,--send-keys=}'[send keyboard input to the specified device]:keyboard input' \ 0044 $blockoperations"--photo=[open the connected device's camera and transfer the photo]:file:_files" \ 0045 + 'sms' \ 0046 '(operation)--send-sms=[send an SMS]:message:' \ 0047 '(operation)--destination=[specify phone number to send the SMS to]:phone number:' \ 0048 '(operation)*--attachment=[attachment to send with the message]:file:_files'