Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
completion for gphoto2
- X-seq: zsh-workers 19405
- From: Mikael Magnusson <mangosoft@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: completion for gphoto2
- Date: Tue, 3 Feb 2004 16:56:21 +0100 (CET)
- Cc: Mikael Magnusson <mangosoft@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I wrote a simple completion function for gphoto2 that completes all
functions listed in the manual. Some arguments could possibly have some
more completion on them, like --rm-dir, but that would require getting
info from the camera which would be slow, and I don't know how to parse it
anyway :)
PS please CC replies to me, not subscribed
--
Mikael Magnusson
#compdef gphoto2
_arguments -s \
'--debug[Turn on debugging]' \
'(-q --quiet)'{-q,--quiet}'[Quiet output (default=verbose)]' \
'(-v --version)'{-v,--version}'[Display version and exit]' \
'(-h --help)'{-h,--help}'[Display a short usage message]' \
'--list-cameras[List supported camera models]' \
'--list-ports[List supported port devices]' \
'--stdout[Send file to stdout]' \
'--stdout-size[Print filesize before data]' \
'--auto-detect[List auto-detected cameras]' \
'--port[Specify port device]':port \
'--speed[Specify serial transfer speed]':speed \
'--camera[Specify camera model]':camera \
'--filename[Specify pattern to save file as, %a %A %b %B %d %H %k %I %l %j %m %S %y (see date(1)), and %n for the number, %C for the suffix, %f for filename without suffix]':pattern \
'--usbid[(Expert only) Override USB IDs]':usbid \
'(-a --abilities)'{-a,--abilities}'[Display camera abilities]' \
'(-f --folder)'{-f,--folder}'[Specify camera folder (default="/")]':folder \
'(-R --recurse)'{-R,--recurse}'[Recursion (default for download)]' \
'--no-recurse[No recursion (default for deletion)]' \
'(-l --list-folders)'{-l,--list-folders}'[List folders in folder]' \
'(-L --list-files)'{-L,--list-files}'[List files in folder]' \
'(-m --mkdir)'{-m,--mkdir}'[Create a directory]':directory \
'(-r --rmdir)'{-r,--rmdir}'[Remove a directory]':directory \
'(-n --num-files)'{-n,--num-files}'[Display number of files]' \
'(-p --get-file)'{-p,--get-file}'[Get files given in range]':range \
'(-P --get-all-files)'{-P,--get-all-files}'[Get all files from folder]' \
'(-t --get-thumbnail)'{-t,--get-thumbnail}'[Get thumbnails given in range]':range \
'(-T --get-all-thumbnails)'{-T,--get-all-thumbnails}'[Get thumbnails given in range]':range \
'(-r --get-raw-data)'{-r,--get-raw-data}'[Get raw data given in range]':range \
'--get-all-raw-data[Get all raw data from folder]' \
'--get-audio-data[Get audio data given in range]':range \
'--get-all-audio-data[Get all audio data from folder]' \
'--delete-files[Delete files given in range]':range \
'--delete-all-files[Delete all files in folder]' \
'(-u --upload-file)'{-u,--upload-file}'[Upload a file to camera]':file:_files \
'--capture-preview[Capture a quick preview]' \
'--capture-image[Capture an image]' \
'--capture-movie[Capture a movie]' \
'--capture-sound[Capture an audio clip]' \
'--show-info[Show info about given range]':range \
'--summary[Summary of camera status]' \
'--manual[Camera driver manual]' \
'--about[About the camera driver]' \
'--shell[Start the gphoto2 shell]'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author