Compare commits
15 Commits
0b64e6bbff
...
8a1a8d9f86
| Author | SHA1 | Date |
|---|---|---|
|
|
8a1a8d9f86 | |
|
|
8d93e4c1ee | |
|
|
3429cd2c1f | |
|
|
4dbdbd4f8b | |
|
|
5a5edf6914 | |
|
|
39b0b06c15 | |
|
|
d4af3659cc | |
|
|
46c88449e6 | |
|
|
989d044545 | |
|
|
318dc0bec5 | |
|
|
a83d61b6c6 | |
|
|
ad47c4a28f | |
|
|
7dd26c5d5c | |
|
|
8794fdca69 | |
|
|
f240565bf4 |
|
|
@ -0,0 +1,318 @@
|
||||||
|
#compdef aac2mp4 mp42aac mp42avc mp42hevc mp42hls mp42ts mp4compact mp4dash mp4dashclone mp4dcfpackager mp4decrypt mp4dump mp4edit mp4encrypt mp4extract mp4fragment mp4hls mp4iframeindex mp4info mp4mux mp4rtphintinfo mp4split mp4tag
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
# a copy of this software and associated documentation files (the
|
||||||
|
# "Software"), to deal in the Software without restriction, including
|
||||||
|
# without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
# permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
# the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
# OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
#
|
||||||
|
# Completion script for bento4 tools 1.6.0-641 (https://github.com/axiomatic-systems/Bento4)
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Authors
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local -a encrypt_methods=(
|
||||||
|
OMA-PDCF-CBC OMA-PDCF-CTR MARLIN-IPMP-ACBC MARLIN-IPMP-ACGK ISMA-IAEC PIFF-CBC
|
||||||
|
PIFF-CTR MPEG-CENC MPEG-CBC1 MPEG-CENS MPEG-CBCS
|
||||||
|
)
|
||||||
|
local -a options=()
|
||||||
|
|
||||||
|
case $service in
|
||||||
|
(mp42aac|mp42avc|mp42hevc)
|
||||||
|
options+=('--key[128-bit decryption key (in hex: 32 chars)]:key')
|
||||||
|
;;
|
||||||
|
(mp42hls)
|
||||||
|
options+=(
|
||||||
|
'--verbose[enable verbose mode]'
|
||||||
|
'--show-info[show information]'
|
||||||
|
'--hls-version[HLS version(default: 3)]:version'
|
||||||
|
'--pmt-pid[PID to use for the PMT(default: 0x100)]:pid'
|
||||||
|
'--audio-pid[PID to use for audio packets(default: 0x101)]:pid'
|
||||||
|
'--video-pid[PID to use for video packets(default: 0x102)]:pid'
|
||||||
|
'--audio-track-id[Read audio from the given track ID(0 means no audio)]:track_id'
|
||||||
|
'--video-track-id[Read video from the given track ID(0 means no video)]:track_id'
|
||||||
|
'--audio-format[Format to use for audio-only segments(default: ts)]:format:(ts packed)'
|
||||||
|
'--segment-duration[Target segment duration in seconds(default: 6)]:seconds'
|
||||||
|
'--segment-duration-threshold[Segment duration threshold in milliseconds(default: 15)]:seconds'
|
||||||
|
'--pcr-offset[offset in units of 90kHz(default: 1000)]:offset'
|
||||||
|
'--index-filename[File name to use for the playlist/index(default: stream.m3u8)]:name:_files'
|
||||||
|
'--allow-cache[set #EXT-X-ALLOW_CACHE to YES or NO]: :(YES NO)'
|
||||||
|
'--segment-filename-template[File name pattern to use for the segment(default: segment-%d.<ext> or stream.<ext>)]:pattern'
|
||||||
|
'--segment-url-template[URL pattern to use for segments(default: segment-%d.<ext> or stream.<ext>)]:pattern'
|
||||||
|
'--iframe-index-filename[File name to use for the I-Frame playlist(default: iframes.m3u8)]:file:_files'
|
||||||
|
'--output-single-file[Output all the media in a single file instead of separate segment files]'
|
||||||
|
'--encryption-mode[Encryption mode(default: AES-128)]:mode:(AES-128 SAMPLE-AES)'
|
||||||
|
'--encryption-key[Encryption key in hexadecimal(default: no encryption)]:key'
|
||||||
|
'--encryption-iv-mode[Encryption IV mode(default: separate)]:mode:(sequence random fps)'
|
||||||
|
'--encryption-key-uri[Encryption key URI, relative or absolute URI(default: key.bin)]:uri'
|
||||||
|
'--encryption-key-format[Encryption key format(default: identity)]:format'
|
||||||
|
'--encryption-key-format-versions[Encryption key format versions]:versions'
|
||||||
|
'--encryption-key-line[Preformatted encryption key line]:ext_x_key_line'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp42ts)
|
||||||
|
options+=(
|
||||||
|
'--pmt-pid[PID to use for the PMT(default: 0x100)]:pid'
|
||||||
|
'--audio-pid[PID to use for audio packets(default: 0x101)]:pid'
|
||||||
|
'--video-pid[PID to use for video packets(default: 0x102)]:pid'
|
||||||
|
'--segment[Segment duration in seconds]:seconds'
|
||||||
|
'--segment-duration-threshold[Segment duration threshold in milliseconds(default: 50)]:seconds'
|
||||||
|
'--pcr-offset[offset in units of 90kHz(default: 1000)]:offset'
|
||||||
|
'--verbose[enable verbose mode]'
|
||||||
|
'--playlist[Playlist file name]:file:_files'
|
||||||
|
'--playlist-hls-version[HLS version(default: 3)]:version'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4compact)
|
||||||
|
options+=('--verbose[Enable verbose mode]')
|
||||||
|
;;
|
||||||
|
(mp4dash)
|
||||||
|
options+=(
|
||||||
|
'(- *)'{-h,--help}'[Show this help message and exit]'
|
||||||
|
'(-v --verbose)'{-v,--verbose}'[Be verbose]'
|
||||||
|
'(-d --debug)'{-d,--debug}'[Print out debugging information]'
|
||||||
|
'(-o --output-dir)'{-o,--output-dir=}'[Output directory]:dir:_files -/'
|
||||||
|
'(-f --force)'{-f,--force}'[Allow output to an existing directory]'
|
||||||
|
'--mpd-name=[MPD file name]:file:_files'
|
||||||
|
'--profiles=[Comma-separated list of one or more profile(s)]:profiles'
|
||||||
|
'--no-media[Do not output media files (MPD/Manifests only)]'
|
||||||
|
'--rename-media[Use a file name pattern instead of the base name of input files]'
|
||||||
|
'--media-prefix=[Use this prefix for prefixed media file names(default: media)]:prefix'
|
||||||
|
'--init-segment=[Initialization segment name]:file:_files'
|
||||||
|
'--no-split[Do not split the file into individual segment files]'
|
||||||
|
'--use-segment-list[Use segment lists instead of segment templates]'
|
||||||
|
'--use-segment-template-number-padding[Use padded numbers in segment URL/filename templates]'
|
||||||
|
'--use-segment-timeline[Use segment timelines]'
|
||||||
|
'--min-buffer-time=[Minimum buffer time in seconds]:seconds'
|
||||||
|
'--max-playout-rate=[Max Playout Rate setting strategy for trick-play support]:strategy:(lowest:X)'
|
||||||
|
'--language-map=[Remap language code <lang_from> to <lang_to>]:from_to_list'
|
||||||
|
'--always-output-lang[Always output an @lang attribute for audio tracks]'
|
||||||
|
'--subtitles[Enable Subtitles]'
|
||||||
|
*'--attributes=[Specify the attributes of a set of tracks]:attribute'
|
||||||
|
'--smooth[Produce an output compatible with Smooth Streaming]'
|
||||||
|
'--smooth-client-manifest-name=[Smooth Streaming Client Manifest file name]:file:_files'
|
||||||
|
'--smooth-server-manifest-name=[Smooth Streaming Server Manifest file name]:file:_files'
|
||||||
|
'--smooth-h264-fourcc=[Smooth Streaming FourCC value for H.264 video(default H264)]:fourcc'
|
||||||
|
'--hls[Output HLS playlists in addition to MPEG DASH]'
|
||||||
|
'--hls-key-url=[HLS key URL (default: key.bin)]:url'
|
||||||
|
'--hls-master-playlist-name=[HLS master playlist name (default: master.m3u8)]:file:_files'
|
||||||
|
'--hls-media-playlist-name=[HLS media playlist name (default: media.m3u8)]:file:_files'
|
||||||
|
'--hls-iframes-playlist-name=[HLS I-Frames playlist name (default: iframes.m3u8)]'
|
||||||
|
'--hippo[Produce an output compatible with the Hippo Media Server]'
|
||||||
|
'--hippo-server-manifest-name=[Hippo Media Server Manifest file name]:file:_files'
|
||||||
|
'--use-compat-namespace[Use the original DASH MPD namespace]'
|
||||||
|
'--use-legacy-audio-channel-config-uri[Use the legacy DASH namespace URI]'
|
||||||
|
'--encryption-key=[Encryption key specifications]:key_spec'
|
||||||
|
'--encryption-cenc-scheme=[MPEG Common Encryption scheme(default: cenc)]:scheme:(cenc cbc1 cens cbcs)'
|
||||||
|
'--encryption-args=[Pass additional command line arguments to mp4encrypt]:args'
|
||||||
|
'--eme-signaling=[Add EME-compliant signaling in the MPD and PSSH boxes]:type:(pssh-v0 pssh-v1)'
|
||||||
|
'--merge-keys[Merge all keys in a single set used for all ContentProtection elements]'
|
||||||
|
'--marlin[Add Marlin signaling to the MPD]'
|
||||||
|
'--marlin-add-pssh[Add an (optional) Marlin "pssh" box in the init segment(s)]'
|
||||||
|
'--playready[Add PlayReady signaling to the MPD]'
|
||||||
|
'--playready-version=[PlayReady version to use]:version:(4.0 4.1 4.2 4.3)'
|
||||||
|
'--playready-header=[Add a PlayReady PRO element in the MPD and a PlayReady PSSH box in the init segments]:header'
|
||||||
|
'--playready-no-pssh[Do not store the PlayReady header in a "pssh" box in the init segment(s)]'
|
||||||
|
'--widevine[Add Widevine signaling to the MPD]'
|
||||||
|
'--widevine-header=[Add a Widevine entry in the MPD, and a Widevine PSSH box in the init segments]:header'
|
||||||
|
'--primetime[Add Primetime signaling to the MPD]'
|
||||||
|
'--primetime-metadata=[Add Primetime metadata in a PSSH box in the init segments]:metadata'
|
||||||
|
'--fairplay-key-uri=[Specify the key URI to use for FairPlay Streaming key delivery]:uri'
|
||||||
|
'--clearkey[Add Clear Key signaling to the MPD]'
|
||||||
|
'--clearkey-license-uri=[Specify the license/key URI to use for Clear Key]'
|
||||||
|
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4dashclone)
|
||||||
|
options+=(
|
||||||
|
'(- *)'{-h,--help}'[Show this help message and exit]'
|
||||||
|
'--quiet[Be quiet]'
|
||||||
|
'--encrypt=[Encrypt the media with KID and KEY specified in HEX(32 characters each)]:key'
|
||||||
|
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4dcfpackager)
|
||||||
|
options+=(
|
||||||
|
'--method[method name]:method:(NULL CBC CTR)'
|
||||||
|
'--content-type[Content MIME type]:mime_type'
|
||||||
|
'--content-id[Content ID]:id'
|
||||||
|
'--rights-issuer[rights issuer URL]:url'
|
||||||
|
'--key[Specify the key to use for encryption]:key'
|
||||||
|
*'--textual-header[Specify a textual header]:header'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4decrypt)
|
||||||
|
options+=(
|
||||||
|
'--show-progress[Show progress details]'
|
||||||
|
'--key[Specify the key to use for decryption]:key'
|
||||||
|
'--fragments-info[File to decrypt the fragments read from]:file:_files'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4dump)
|
||||||
|
options+=(
|
||||||
|
'--verbosity[Set the verbosity level]:level:(0 1 2 3)'
|
||||||
|
'--track[Write the track data into a file]:file:_files'
|
||||||
|
'--format[Format to use for the output(default: text)]:format:(text json)'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4edit)
|
||||||
|
options+=(
|
||||||
|
'--insert[insert atom data]:atom_path_and_source_and_position'
|
||||||
|
'--remove[remove atom data]:atom_path'
|
||||||
|
'--replace[replace atom data]:atom_path_and_source'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4encrypt)
|
||||||
|
options+=(
|
||||||
|
'--method=[Encryption method]:method:($encrypt_methods)'
|
||||||
|
'--show-progress[Show progress details]'
|
||||||
|
'--fragments-info[Encrypt the fragments read from <input> with track info read from the given file]:file:_files'
|
||||||
|
'--multi[Encrypt multiple individual fragment files]'
|
||||||
|
'--key[Specify the key to use for a track (or group key)]:key_spec'
|
||||||
|
'--strict[Fail if there is a warning]'
|
||||||
|
*'--property[Specify a named string property for a track]:property'
|
||||||
|
'--global-option[Set the global option]:option'
|
||||||
|
'--pssh[Add a "pssh" atom for this system ID with the payload]:pssh'
|
||||||
|
'--pssh-v1[Same as --pssh but generates a version=1 "pssh" atom]:pssh'
|
||||||
|
'--kms-uri[Specify the KMS URI for the ISMA-IAEC method]:uri'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4extract)
|
||||||
|
options+=(
|
||||||
|
'--payload-only[Omit the atom header]'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4fragment)
|
||||||
|
options+=(
|
||||||
|
'--verbosity[Set the verbosity level]:level:(0 1 2 3)'
|
||||||
|
'--debug[Enable debugging information output]'
|
||||||
|
'--quiet[Do not print out notice messages]'
|
||||||
|
'--fragment-duration[Fragment duration in milliseconds(default: automatic)]:msecs'
|
||||||
|
'--timescale[Time scale]:time_scale'
|
||||||
|
'--track[Specify track ID or type only include media from one track]:id_or_type:(audio video subtitles)'
|
||||||
|
'--index[(Re)create the segment index]'
|
||||||
|
'--trim[Trim excess media in longer tracks]'
|
||||||
|
'--no-tfdt[Do not add "tfdt boxes in the fragments"]'
|
||||||
|
'--tfdt-start[Set start value of the first tfdt timestamp]:start'
|
||||||
|
'--sequence-number-start[Set start value of the first segment sequence number(default: 1)]:number'
|
||||||
|
'--force-i-frame-sync[Treat all I-frames as sync samples]:type:(auto all)'
|
||||||
|
'--copy-udta[Copy the moov/udta atom from input to output]'
|
||||||
|
'--no-zero-elst[Do not set the last edit list entry to 0 duration]'
|
||||||
|
'--trun-version-zero[Set the "trun" box version to zero(default version: 1)]'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4hls)
|
||||||
|
options+=(
|
||||||
|
'(- *)'{-h,--help}'[Show this help message and exit]'
|
||||||
|
'(-v --verbose)'{-v,--verbose}'[Be verbose]'
|
||||||
|
'(-d --debug)'{-d,--debug}'[Print out debugging information]'
|
||||||
|
'(-o --output-dir)'{-o,--output-dir=}'[Output directory]:dir:_files -/'
|
||||||
|
'(-f --force)'{-f,--force}'[Allow output to an existing directory]'
|
||||||
|
'--hls-version=[HLS version]:version'
|
||||||
|
'--master-playlist-name=[Master Playlist name]:file:_files'
|
||||||
|
'--media-playlist-name=[Media Playlist name]:file:_files'
|
||||||
|
'--iframe-playlist-name=[I-frame Playlist name]:name'
|
||||||
|
'--output-single-file[Store segment data in a single output file per input file]'
|
||||||
|
'--audio-format=[Format for audio segments]:format:(packed ts)'
|
||||||
|
'--segment-duration=[Segment duration(default: 6)]:duration'
|
||||||
|
'--encryption-mode=[Encryption mode(default: AES-128)]:mode:(AES-128 SAMPLE-AES)'
|
||||||
|
'--encryption-key=[Encryption key in hexadecimal]:key'
|
||||||
|
'--encryption-iv-mode=[Encryption IV mode]:mode:(sequence random fps)'
|
||||||
|
'--encryption-key-uri=[Encryption key URI(default: key.bin)]:uri'
|
||||||
|
'--encryption-key-format=[Encryption key format (default: identity)]:mode:(identity)'
|
||||||
|
'--encryption-key-format-versions=[Encryption key format versions]:versions'
|
||||||
|
'--signal-session-key[Signal an #EXT-X-SESSION-KEY tag in the master playlist]'
|
||||||
|
'--fairplay=[Enable FairPlay Key Delivery and set parameters]:parameters'
|
||||||
|
'--widevine=[Enable Widevine Key Delivery and set parameters]:parameters'
|
||||||
|
'--output-encryption-key[Output the encryption key to a file]'
|
||||||
|
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
|
||||||
|
'--base-url=[The base URL for the Media Playlists and TS files listed in the playlists]:uri'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4iframeindex)
|
||||||
|
options+=(
|
||||||
|
'--track[ID of the video track]:id'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4info)
|
||||||
|
options+=(
|
||||||
|
'--verbose[Show extended information when available]'
|
||||||
|
'--format[Display the information in this format(default: text)]:format:(text json)'
|
||||||
|
'--show-layout[Show sample layout]'
|
||||||
|
'--show-samples[Show sample details]'
|
||||||
|
'--show-sample-data[Show sample data]'
|
||||||
|
'--fast[Skip some details that are slow to compute]'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4mux)
|
||||||
|
options+=(
|
||||||
|
*'--track=[Track type, input, parameters]:track'
|
||||||
|
'--verbose[Show more details]'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4rtphintinfo)
|
||||||
|
options+=(
|
||||||
|
'--trackid[Hint track ID]:id'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4split)
|
||||||
|
options+=(
|
||||||
|
'--verbose[Print verbose information when running]'
|
||||||
|
'--init-segment[Name of init segment(default: init.mp4)]:file:_files'
|
||||||
|
'--init-only[Only output the init segment(no media segments)]'
|
||||||
|
'--media-segment[Segment file name pattern(default: segment-%llu.%04llu.m4s)]:pattern'
|
||||||
|
'--start-number[Start numbering segments at n(default=1)]:number'
|
||||||
|
'--pattern-parameters[One or more selector letter(default: IN)]:params'
|
||||||
|
'--track-id[Only output segments with this track ID]:id'
|
||||||
|
'--audio[Only output audio segments]'
|
||||||
|
'--video[Only output video segments]'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
(mp4tag)
|
||||||
|
options+=(
|
||||||
|
'--help[Print this usage information]'
|
||||||
|
'--show-tags[Show tags found in the input file]'
|
||||||
|
'--list-symbols[List all the builtin symbols]'
|
||||||
|
'--list-keys[List all the builtin symbolic key names]'
|
||||||
|
'--set[Set a tag]:tag'
|
||||||
|
'--add[Set/Add a tag]:tag'
|
||||||
|
'--remove[Remove a tag]:key'
|
||||||
|
'--extract[extract the value of a tag and save it to a file]:key_file'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
_arguments \
|
||||||
|
$options[@] \
|
||||||
|
"*::file:_files"
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: Shell-Script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# sh-basic-offset: 2
|
||||||
|
# End:
|
||||||
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
#
|
#
|
||||||
# Completion script for dart 3.9.0 (https://dart.dev/)
|
# Completion script for dart 3.11.0 (https://dart.dev/)
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Authors
|
# Authors
|
||||||
|
|
@ -362,6 +362,7 @@ _dart_pub() {
|
||||||
(add|get|remove|upgrade)
|
(add|get|remove|upgrade)
|
||||||
opts+=(
|
opts+=(
|
||||||
'--precompile[Build executables in immediate dependencies]'
|
'--precompile[Build executables in immediate dependencies]'
|
||||||
|
'--no-example[Do not run "example/" if it exists]'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
(get)
|
(get)
|
||||||
|
|
@ -373,6 +374,7 @@ _dart_pub() {
|
||||||
opts+=(
|
opts+=(
|
||||||
'(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]'
|
'(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]'
|
||||||
'--skip-validation[Publish without validation and resolution]'
|
'--skip-validation[Publish without validation and resolution]'
|
||||||
|
'--ignore-warnings[Do not treat warnings as fatal]'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
(upgrade)
|
(upgrade)
|
||||||
|
|
|
||||||
314
src/_flutter
314
src/_flutter
|
|
@ -25,7 +25,7 @@
|
||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
#
|
#
|
||||||
# Completion script for the Flutter.io sdk's cli tool 3.35.1 (https://flutter.dev)
|
# Completion script for the Flutter.io sdk's cli tool 3.41.1 (https://flutter.dev)
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Authors
|
# Authors
|
||||||
|
|
@ -106,16 +106,15 @@ _flutter() {
|
||||||
(assemble)
|
(assemble)
|
||||||
_arguments \
|
_arguments \
|
||||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
\*{-d,--define=}'[Allows passing configuration to a target]:configuration' \
|
\*{-D,--dart-define=}'[Additional key-value pairs that will be available as constants]:define' \
|
||||||
'--performance-measurement-file[Output individual target performance to a JSON file]' \
|
|
||||||
{-i,--input=}'[Allows passing additional input]: :' \
|
|
||||||
'--depfile=[A file path where a depfile will be written]: :_path_files' \
|
|
||||||
'--build-inputs=[A file path where a newline-separated file containing all inputs used will be written after a build]: :_path_files' \
|
|
||||||
'--build-outputs=[A file path where a newline-separated file containing all outputs used will be written after a build]: :_path_files' \
|
|
||||||
'(-o --output)'{-o,--output=}'[A directory where output files will be written]: :_path_files -/' \
|
|
||||||
'*--dart-define=[Additional key-value pairs that will be available as constants]:' \
|
|
||||||
'--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \
|
'--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \
|
||||||
'--resource-pool-size=[The maximum number of concurrent tasks the build system will run]:number:' \
|
'--performance-measurement-file[Output individual target performance to a JSON file]' \
|
||||||
|
{-i,--input=}'[Allows passing additional input]::input' \
|
||||||
|
'--depfile=[A file path where a depfile will be written]:file:_files' \
|
||||||
|
'--build-inputs=[A file path where a newline-separated file containing all inputs used will be written after a build]:files:_files' \
|
||||||
|
'--build-outputs=[A file path where a newline-separated file containing all outputs used will be written after a build]:files:_files' \
|
||||||
|
'(-o --output)'{-o,--output=}'[A directory where output files will be written]:dir:_files -/' \
|
||||||
|
'--resource-pool-size=[The maximum number of concurrent tasks the build system will run]:number' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(attach)
|
(attach)
|
||||||
|
|
@ -126,15 +125,15 @@ _flutter() {
|
||||||
'(-t --target)'{-t,--target=}'[The main entry-point file of the application, as run on the device.(defaults to "lib/main.dart")]::_files -g "*.dart"' \
|
'(-t --target)'{-t,--target=}'[The main entry-point file of the application, as run on the device.(defaults to "lib/main.dart")]::_files -g "*.dart"' \
|
||||||
'--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \
|
'--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \
|
||||||
'--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \
|
'--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \
|
||||||
'*--dart-define=[Additional key-value pairs that will be available as constants]:' \
|
\*{-D,--dart-define=}'[Additional key-value pairs that will be available as constants]:define' \
|
||||||
'--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \
|
'--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \
|
||||||
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
'--device-user=[Identifier number for a user or work profile on Android only]:id' \
|
||||||
'--debug-url=[The URL at which the observatory is listening]:url:' \
|
'--debug-url=[The URL at which the observatory is listening]:url' \
|
||||||
'--app-id=[The package name (Android) or bundle identifier (iOS) for the app]:app_id:' \
|
'--app-id=[The package name (Android) or bundle identifier (iOS) for the app]:app_id' \
|
||||||
'--pid-file=[Specify a file to write the process id to]: :_files' \
|
'--pid-file=[Specify a file to write the process id to]:file:_files' \
|
||||||
'(--no-track-widget-creation --track-widget-creation)--track-widget-creation[Track widget creation location(defaults on)]' \
|
'(--no-track-widget-creation --track-widget-creation)--track-widget-creation[Track widget creation location(defaults on)]' \
|
||||||
'(--no-track-widget-creation --track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \
|
'(--no-track-widget-creation --track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \
|
||||||
'--dds-port=[When this value is provided, the Dart Development Service (DDS) will be bound to the provided port]:port:' \
|
'--dds-port=[When this value is provided, the Dart Development Service (DDS) will be bound to the provided port]:port' \
|
||||||
'(--no-dds --dds)--dds[Enable the Dart Developer Service]' \
|
'(--no-dds --dds)--dds[Enable the Dart Developer Service]' \
|
||||||
'(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \
|
'(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \
|
||||||
'--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \
|
'--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \
|
||||||
|
|
@ -144,8 +143,8 @@ _flutter() {
|
||||||
(bash-completion)
|
(bash-completion)
|
||||||
_arguments \
|
_arguments \
|
||||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
'(--no-overwrite --overwrite)--overwrite[Overwritten completion setup if it already exists]' \
|
'(--no-overwrite --overwrite)--overwrite[Overwrite completion setup if it already exists]' \
|
||||||
'(--overwrite --no-overwrite)--no-overwrite[Not overwritten completion setup if it already exists]' \
|
'(--overwrite --no-overwrite)--no-overwrite[Not overwrite completion setup if it already exists]' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(build)
|
(build)
|
||||||
|
|
@ -153,13 +152,14 @@ _flutter() {
|
||||||
;;
|
;;
|
||||||
(config)
|
(config)
|
||||||
_arguments \
|
_arguments \
|
||||||
'(-h --help)'{-h,--help}'[Print this usage information]' \
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
'--list[List all settings and their current values]' \
|
'--list[List all settings and their current values]' \
|
||||||
'--clear-ios-signing-cert[Clear the saved development certificate choice used to sign apps for iOS device deployment]' \
|
'--clear-ios-signing-cert[Clear the saved development certificate choice used to sign apps for iOS device deployment]' \
|
||||||
'--android-sdk=[The Android SDK directory]: :_path_files -/' \
|
'--select-ios-signing-settings[Complete prompt to select and save code signing settings to sign apps for iOS]' \
|
||||||
'--android-studio-dir=[The Android Studio install directory]: :_path_files -/' \
|
'--android-sdk=[The Android SDK directory]:dir:_files -/' \
|
||||||
'--jdk-dir=[The Java Development Kit installation directory]: :_path_files -/' \
|
'--android-studio-dir=[The Android Studio install directory]:dir:_files -/' \
|
||||||
'--build-dir=[The relative path to override a projects build directory]: :_path_files -/' \
|
'--jdk-dir=[The Java Development Kit installation directory]:dir:_files -/' \
|
||||||
|
'--build-dir=[The relative path to override a projects build directory]:dir:_files -/' \
|
||||||
'(--no-enable-web --enable-web)--enable-web[Enable Flutter for web]' \
|
'(--no-enable-web --enable-web)--enable-web[Enable Flutter for web]' \
|
||||||
'(--no-enable-web --enable-web)--no-enable-web[Disable Flutter for web]' \
|
'(--no-enable-web --enable-web)--no-enable-web[Disable Flutter for web]' \
|
||||||
'(--no-enable-linux-desktop --enable-linux-desktop)--enable-linux-desktop[Enable support for desktop on Linux]' \
|
'(--no-enable-linux-desktop --enable-linux-desktop)--enable-linux-desktop[Enable support for desktop on Linux]' \
|
||||||
|
|
@ -182,43 +182,43 @@ _flutter() {
|
||||||
'(--no-cli-animations --cli-animations)--no-cli-animations[Disable animations in the command line interface]' \
|
'(--no-cli-animations --cli-animations)--no-cli-animations[Disable animations in the command line interface]' \
|
||||||
'(--no-enable-native-assets --enable-native-assets)--enable-native-assets[Enable native assets compilation and bundling]' \
|
'(--no-enable-native-assets --enable-native-assets)--enable-native-assets[Enable native assets compilation and bundling]' \
|
||||||
'(--no-enable-native-assets --enable-native-assets)--no-enable-native-assets[Disable native assets compilation and bundling]' \
|
'(--no-enable-native-assets --enable-native-assets)--no-enable-native-assets[Disable native assets compilation and bundling]' \
|
||||||
'(--no-enable-flutter-preview --enable-flutter-preview)--enable-flutter-preview[Enable Flutter preview prebuilt device]' \
|
'(--no-enable-dart-data-assets --enable-dart-data-assets)--enable-dart-data-assets[Enable Dart data assets building and bundling]' \
|
||||||
'(--no-enable-flutter-preview --enable-flutter-preview)--no-enable-flutter-preview[Disable Flutter preview prebuilt device]' \
|
'(--no-enable-dart-data-assets --enable-dart-data-assets)--no-enable-dart-data-assets[Disable Dart data assets building and bundling]' \
|
||||||
'(--no-enable-swift-package-manager --enable-swift-package-manager)--enable-swift-package-manager[Enable support for Swift Package Manager]' \
|
'(--no-enable-swift-package-manager --enable-swift-package-manager)--enable-swift-package-manager[Enable support for Swift Package Manager]' \
|
||||||
'(--no-enable-swift-package-manager --enable-swift-package-manager)--no-enable-swift-package-manager[Disable support for Swift Package Manager]' \
|
'(--no-enable-swift-package-manager --enable-swift-package-manager)--no-enable-swift-package-manager[Disable support for Swift Package Manager]' \
|
||||||
|
'(--no-omit-legacy-version-file --omit-legacy-version-file)--omit-legacy-version-file[Enable stops writing the legacy version file]' \
|
||||||
|
'(--no-omit-legacy-version-file --omit-legacy-version-file)--no-omit-legacy-version-file[Disable stops writing the legacy version file]' \
|
||||||
|
'(--no-enable-windowing --enable-windowing)--enable-windowing[Enable for windowing]' \
|
||||||
|
'(--no-enable-windowing --enable-windowing)--no-enable-windowing[Disable for windowing]' \
|
||||||
|
'(--no-enable-lldb-debugging --enable-lldb-debugging)--enable-lldb-debugging[Enable support for debugging with LLDB]' \
|
||||||
|
'(--no-enable-lldb-debugging --enable-lldb-debugging)--no-enable-lldb-debugging[Disable support for debugging with LLDB]' \
|
||||||
|
'(--no-enable-uiscene-migration --enable-uiscene-migration)--enable-uiscene-migration[Enable support for migration to UIScene lifecycle]' \
|
||||||
|
'(--no-enable-uiscene-migration --enable-uiscene-migration)--no-enable-uiscene-migration[Disable support for migration to UIScene lifecycle]' \
|
||||||
'--clear-features[Remove all configured features and restore them to the default values]' \
|
'--clear-features[Remove all configured features and restore them to the default values]' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(create)
|
(create)
|
||||||
_arguments \
|
_arguments \
|
||||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
'(--pub --no-pub)--pub[Whether to run "flutter packages get" after the project has been created. (defaults to on)]' \
|
'(--pub --no-pub)--pub[Run "flutter packages get" after the project has been created. (defaults to on)]' \
|
||||||
'(--pub --no-pub)--no-pub[Whether to run "flutter packages get" after the project has been created. (defaults to on)]' \
|
'(--pub --no-pub)--no-pub[Do not run "flutter packages get" after the project has been created]' \
|
||||||
'(--offline --no-offline)--offline[Offline mode when "flutter packages get" is run]' \
|
'(--offline --no-offline)--offline[Run "flutter packages get" in offline mode]' \
|
||||||
'(--offline --no-offline)--no-offline[Offline mode when "flutter packages get" is run]' \
|
'(--offline --no-offline)--no-offline[Do not run "flutter packages get" in offline mode]' \
|
||||||
'(--overwrite --no-overwrite)--overwrite[When performing operations, overwrite existing files]' \
|
'(--overwrite --no-overwrite)--overwrite[When performing operations, overwrite existing files]' \
|
||||||
'(--overwrite --no-overwrite)--no-overwrite[When performing operations, not overwrite existing files]' \
|
'(--overwrite --no-overwrite)--no-overwrite[When performing operations, not overwrite existing files]' \
|
||||||
"--description=[The description to use for your new Flutter project. (defaults to 'A new Flutter project.')]::" \
|
"--description=[The description to use for your new Flutter project(defaults to 'A new Flutter project.')]::" \
|
||||||
"--org=[The organization responsible for new Flutter project, in reverse domain name notation.(defaults to 'com.example')]::" \
|
"--org=[The organization responsible for new Flutter project, in reverse domain name notation.(defaults to 'com.example')]::" \
|
||||||
'--project-name=[The project name for this new Flutter project]:name:' \
|
'--project-name=[The project name for this new Flutter project]:name:' \
|
||||||
'(-i --ios-language)'{-i,--ios-language=}'[iOS project language]: :_flutter_ios_languages' \
|
'(-i --ios-language)'{-i,--ios-language=}'[iOS project language]: :_flutter_ios_languages' \
|
||||||
'(-a --android-language)'{-a,--android-language=}'[Android project language]: :_flutter_android_languages' \
|
'(-a --android-language)'{-a,--android-language=}'[Android project language]: :_flutter_android_languages' \
|
||||||
'--platforms=[The platforms supported by this project]:platforms:_flutter_platforms' \
|
'--platforms=[The platforms supported by this project]:platforms:_flutter_platforms' \
|
||||||
'(-t --template=)'{-t,--template=}'[Specify the type of project to create]: :_flutter_project_templates' \
|
'(-t --template=)'{-t,--template=}'[Specify the type of project to create]: :_flutter_project_templates' \
|
||||||
'(-s --sample=)'{-s,--sample=}'[Specifies the Flutter code sample to use as the "main.dart" for an application]:id:' \
|
|
||||||
'(-e --empty)'{-e,--empty}'[Specifies creating using an application template with a main.dart that is minimal]' \
|
'(-e --empty)'{-e,--empty}'[Specifies creating using an application template with a main.dart that is minimal]' \
|
||||||
'--list-samples=[Specifies a JSON output file for a listing of Flutter code samples that can be created with "--sample"]: :_path_files' \
|
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(custom-devices)
|
(custom-devices)
|
||||||
_flutter_custom_devices && ret=0
|
_flutter_custom_devices && ret=0
|
||||||
;;
|
;;
|
||||||
(daemon)
|
|
||||||
_arguments \
|
|
||||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
|
||||||
'--listen-on-tcp-port=[If specified, the daemon will be listening for commands on the specified port instead of stdio]:port:' \
|
|
||||||
&& ret=0
|
|
||||||
;;
|
|
||||||
(debug-adapter)
|
(debug-adapter)
|
||||||
_arguments \
|
_arguments \
|
||||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
|
|
@ -232,7 +232,6 @@ _flutter() {
|
||||||
(devices)
|
(devices)
|
||||||
_arguments \
|
_arguments \
|
||||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
'--machine[Output device information in machine readable structured JSON format]' \
|
|
||||||
"--device-timeout=[Time in seconds to wait for devices to attach]:seconds:" \
|
"--device-timeout=[Time in seconds to wait for devices to attach]:seconds:" \
|
||||||
'--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \
|
'--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
|
|
@ -251,26 +250,23 @@ _flutter() {
|
||||||
'--release[Build a release version of your app]' \
|
'--release[Build a release version of your app]' \
|
||||||
'*--dart-define=[Additional key-value pairs that will be available as constants]:' \
|
'*--dart-define=[Additional key-value pairs that will be available as constants]:' \
|
||||||
'--dart-define-from-file=[The path of a json or .env file containing key-value pairs]: :_files -g "*.(json|env)"' \
|
'--dart-define-from-file=[The path of a json or .env file containing key-value pairs]: :_files -g "*.(json|env)"' \
|
||||||
|
'*--web-define=[Additional key-value pairs that will be available as template variables in web/index.html]' \
|
||||||
'--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \
|
'--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \
|
||||||
'--web-renderer=[The renderer implementation to use when building for the web]: :_flutter_web_renderers' \
|
|
||||||
'--no-web-resources-cdn[Do not use Web static resources hosted on a CDN]' \
|
'--no-web-resources-cdn[Do not use Web static resources hosted on a CDN]' \
|
||||||
'--use-application-binary=[Specify a pre-built application binary to use when running]:app:_files -g "*.apk"' \
|
'--use-application-binary=[Specify a pre-built application binary to use when running]:app:_files -g "*.apk"' \
|
||||||
'--trace-startup[Start tracing during startup]' \
|
'--trace-startup[Start tracing during startup]' \
|
||||||
'(--cache-startup-profile --no-cache-startup-profile)--cache-startup-profile[Caches the CPU profile collected before the first frame for startup analysis]' \
|
'(--cache-startup-profile --no-cache-startup-profile)--cache-startup-profile[Caches the CPU profile collected before the first frame for startup analysis]' \
|
||||||
'(--cache-startup-profile --no-cache-startup-profile)--no-cache-startup-profile[Not caches the CPU profile collected before the first frame for startup analysis]' \
|
'(--cache-startup-profile --no-cache-startup-profile)--no-cache-startup-profile[Not caches the CPU profile collected before the first frame for startup analysis]' \
|
||||||
'--verbose-system-logs[Include verbose logging from the Flutter engine]' \
|
'--verbose-system-logs[Include verbose logging from the Flutter engine]' \
|
||||||
'--cache-sksl[Cache the shader in the SkSL format instead of in binary or GLSL formats]' \
|
|
||||||
'--dump-skp-on-shader-compilation[Cache the shader in the SkSL format instead of in binary or GLSL formats]' \
|
|
||||||
'--purge-persistent-cache[Removes all existing persistent caches]' \
|
'--purge-persistent-cache[Removes all existing persistent caches]' \
|
||||||
'--route[Which route to load when running the app]' \
|
'--route[Which route to load when running the app]' \
|
||||||
'(--no-start-paused --start-paused)--start-paused[Start in a paused mode and wait for a debugger to connect]' \
|
'(--no-start-paused --start-paused)--start-paused[Start in a paused mode and wait for a debugger to connect]' \
|
||||||
'(--no-start-paused --start-paused)--no-start-paused[Not tart in a paused mode and wait for a debugger to connect]' \
|
'(--no-start-paused --start-paused)--no-start-paused[Not start in a paused mode and wait for a debugger to connect]' \
|
||||||
'--endless-trace-buffer[Enable tracing to an infinite buffer, instead of a ring buffer]' \
|
'--endless-trace-buffer[Enable tracing to an infinite buffer, instead of a ring buffer]' \
|
||||||
'--trace-systrace[Enable tracing to the system tracer]' \
|
'--trace-systrace[Enable tracing to the system tracer]' \
|
||||||
'--trace-to-file=[Write the timeline trace to a file at the specified path]:file:_files' \
|
'--trace-to-file=[Write the timeline trace to a file at the specified path]:file:_files' \
|
||||||
'--trace-skia[Enable tracing of Skia code]' \
|
'--trace-skia[Enable tracing of Skia code]' \
|
||||||
'--no-enable-dart-profiling[Disable the Dart VM sampling CPU profiler]' \
|
'--no-enable-dart-profiling[Disable the Dart VM sampling CPU profiler]' \
|
||||||
'--skia-deterministic-rendering[provide completely deterministic Skia rendering]' \
|
|
||||||
*{-a,--dart-entrypoint-args=}'[Pass a list of arguments to the Dart entrypoint at application startup]: :' \
|
*{-a,--dart-entrypoint-args=}'[Pass a list of arguments to the Dart entrypoint at application startup]: :' \
|
||||||
'--wasm[Compile to WebAssembly rather than JavaScript]' \
|
'--wasm[Compile to WebAssembly rather than JavaScript]' \
|
||||||
'--web-tls-cert-path=[The certificate that host will use to serve using TLS connection]:cert:_files' \
|
'--web-tls-cert-path=[The certificate that host will use to serve using TLS connection]:cert:_files' \
|
||||||
|
|
@ -279,8 +275,8 @@ _flutter() {
|
||||||
'(-t --target=)'{-t,--target=}'[The main entry-point file of the application, as run on the device.(defaults to "lib/main.dart")]: :_files -g "*.dart"' \
|
'(-t --target=)'{-t,--target=}'[The main entry-point file of the application, as run on the device.(defaults to "lib/main.dart")]: :_files -g "*.dart"' \
|
||||||
'--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \
|
'--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \
|
||||||
'--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \
|
'--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \
|
||||||
'(--no-pub --pub)--pub[Whether to run "flutter packages get" before executing this command. (defaults to on)]' \
|
'(--no-pub --pub)--pub[Run "flutter packages get" before executing this command. (default: on)]' \
|
||||||
'(--no-pub --pub)--no-pub[Whether to run "flutter packages get" before executing this command. (defaults to on)]' \
|
'(--no-pub --pub)--no-pub[Do not run "flutter packages get" before executing this command]' \
|
||||||
'(--no-track-widget-creation --track-widget-creation)--track-widget-creation[Track widget creation locations(defaults on)]' \
|
'(--no-track-widget-creation --track-widget-creation)--track-widget-creation[Track widget creation locations(defaults on)]' \
|
||||||
'(--no-track-widget-creation --track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \
|
'(--no-track-widget-creation --track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \
|
||||||
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
||||||
|
|
@ -296,8 +292,8 @@ _flutter() {
|
||||||
'(--no-keep-app-running --keep-app-running)--keep-app-running[Will keep the Flutter application running when done testing]' \
|
'(--no-keep-app-running --keep-app-running)--keep-app-running[Will keep the Flutter application running when done testing]' \
|
||||||
'--use-existing-app=[Connect to an already running instance via the given observatory URL]' \
|
'--use-existing-app=[Connect to an already running instance via the given observatory URL]' \
|
||||||
'--driver=[The test file to run on the host]: :_files' \
|
'--driver=[The test file to run on the host]: :_files' \
|
||||||
'--build[If necessary, build the app before running. (defaults to on)]' \
|
'(--no-build --build)--build[If necessary, build the app before running. (defaults to on)]' \
|
||||||
'--no-build[If necessary, not build the app before running]' \
|
'(--no-build --build)--no-build[If necessary, not build the app before running]' \
|
||||||
'--screenshot=[Directory location to write screenshots on test failure]::_path_files -/' \
|
'--screenshot=[Directory location to write screenshots on test failure]::_path_files -/' \
|
||||||
'--driver-port=[The port where Webdriver server is launched at(default to "4444")]:port:' \
|
'--driver-port=[The port where Webdriver server is launched at(default to "4444")]:port:' \
|
||||||
'(--no-headless --headless)--headless[Launch driver browser in headless mode(defaults to on)]' \
|
'(--no-headless --headless)--headless[Launch driver browser in headless mode(defaults to on)]' \
|
||||||
|
|
@ -307,9 +303,8 @@ _flutter() {
|
||||||
'(--no-android-emulator --android-emulator)--android-emulator[Perform Flutter Driver testing using an Android Emulator]' \
|
'(--no-android-emulator --android-emulator)--android-emulator[Perform Flutter Driver testing using an Android Emulator]' \
|
||||||
'(--no-android-emulator --android-emulator)--no-android-emulator[Not perform Flutter Driver testing using an Android Emulator]' \
|
'(--no-android-emulator --android-emulator)--no-android-emulator[Not perform Flutter Driver testing using an Android Emulator]' \
|
||||||
'--chrome-binary=[Location of the Chrome binary]::_files' \
|
'--chrome-binary=[Location of the Chrome binary]::_files' \
|
||||||
'--write-sksl-on-exit[Attempts to write an SkSL file when the drive process is finished to the provided file, overwriting it if necessary]' \
|
'*--test-arguments=[Additional arguments to pass to the Dart VM running The test script]:arg' \
|
||||||
'*--test-arguments=[Additional arguments to pass to the Dart VM running The test script]: :' \
|
'--profile-memory=[Launch devtools and profile application memory, writing the output data as JSON]:file:_files -g "*.json"' \
|
||||||
'--profile-memory=[Launch devtools and profile application memory, writing the output data as JSON]::_files -g "*.json"' \
|
|
||||||
'--timeout=[Timeout the test after the given number of seconds]:seconds' \
|
'--timeout=[Timeout the test after the given number of seconds]:seconds' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
|
|
@ -337,8 +332,6 @@ _flutter() {
|
||||||
'(--no-use-deferred-loading --use-deferred-loading)--use-deferred-loading[Generate the Dart localization file as deferred]' \
|
'(--no-use-deferred-loading --use-deferred-loading)--use-deferred-loading[Generate the Dart localization file as deferred]' \
|
||||||
'(--no-use-deferred-loading --use-deferred-loading)--no-use-deferred-loading[Not generate the Dart localization file as deferred]' \
|
'(--no-use-deferred-loading --use-deferred-loading)--no-use-deferred-loading[Not generate the Dart localization file as deferred]' \
|
||||||
'--gen-inputs-and-outputs-list=[the tool generates a JSON file containing the tools inputs and outputs]::_path_files -/' \
|
'--gen-inputs-and-outputs-list=[the tool generates a JSON file containing the tools inputs and outputs]::_path_files -/' \
|
||||||
'(--no-synthetic-package --synthetic-package)--synthetic-package[Generate files as a synthetic package]' \
|
|
||||||
'(--no-synthetic-package --synthetic-package)--no-synthetic-package[Not generate files as a synthetic package]' \
|
|
||||||
'--project-dir=[the directory of the root Flutter project]::_path_files -/' \
|
'--project-dir=[the directory of the root Flutter project]::_path_files -/' \
|
||||||
'(--no-required-resource-attributes --required-resource-attributes)--required-resource-attributes[Requires all resource ids to contain a corresponding resource attribute]' \
|
'(--no-required-resource-attributes --required-resource-attributes)--required-resource-attributes[Requires all resource ids to contain a corresponding resource attribute]' \
|
||||||
'(--no-required-resource-attributes --required-resource-attributes)--no-required-resource-attributes[Requires all resource ids to contain a corresponding resource attribute]' \
|
'(--no-required-resource-attributes --required-resource-attributes)--no-required-resource-attributes[Requires all resource ids to contain a corresponding resource attribute]' \
|
||||||
|
|
@ -404,9 +397,10 @@ _flutter() {
|
||||||
'--debug[Build a debug version of your app (default mode)]' \
|
'--debug[Build a debug version of your app (default mode)]' \
|
||||||
'--profile[Build a version of your app specialized for performance profiling]' \
|
'--profile[Build a version of your app specialized for performance profiling]' \
|
||||||
'--release[Build a release version of your app]' \
|
'--release[Build a release version of your app]' \
|
||||||
'*--dart-define=[Additional key-value pairs that will be available as constants]: ' \
|
\*{-D,--dart-define=}'[Additional key-value pairs that will be available as constants]:define' \
|
||||||
|
'--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \
|
||||||
|
'*--web-define=[Additional key-value pairs that will be available as template variables in web/index.html]' \
|
||||||
'--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \
|
'--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \
|
||||||
'--web-renderer=[The renderer implementation to use when building for the web]: :_flutter_web_renderers' \
|
|
||||||
'--no-web-resources-cdn[Do not use Web static resources hosted on a CDN]' \
|
'--no-web-resources-cdn[Do not use Web static resources hosted on a CDN]' \
|
||||||
'--use-application-binary=[Specify a pre-built-application binary to use when running]: :_files' \
|
'--use-application-binary=[Specify a pre-built-application binary to use when running]: :_files' \
|
||||||
'--trace-startup[Start tracing during startup]' \
|
'--trace-startup[Start tracing during startup]' \
|
||||||
|
|
@ -414,42 +408,42 @@ _flutter() {
|
||||||
'(--cache-startup-profile --no-cache-startup-profile)--no-cache-startup-profile[Not caches the CPU profile collected before the first frame for startup analysis]' \
|
'(--cache-startup-profile --no-cache-startup-profile)--no-cache-startup-profile[Not caches the CPU profile collected before the first frame for startup analysis]' \
|
||||||
'--verbose-system-logs[Include verbose logging from the Flutter engine]' \
|
'--verbose-system-logs[Include verbose logging from the Flutter engine]' \
|
||||||
'--cache-sksl[Cache the shader in the SkSL format instead of in binary or GLSL formats]' \
|
'--cache-sksl[Cache the shader in the SkSL format instead of in binary or GLSL formats]' \
|
||||||
'--dump-skp-on-shader-compilation[Cache the shader in the SkSL format instead of in binary or GLSL formats]' \
|
|
||||||
'--purge-persistent-cache[Removes all existing persistent caches]' \
|
'--purge-persistent-cache[Removes all existing persistent caches]' \
|
||||||
'--route[Which route to load when running the app]' \
|
'--route[Which route to load when running the app]' \
|
||||||
'(--no-start-paused --start-paused)--start-paused[Start in a paused mode and wait for a debugger to connect]' \
|
'(--no-start-paused --start-paused)--start-paused[Start in a paused mode and wait for a debugger to connect]' \
|
||||||
'(--no-start-paused --start-paused)--no-start-paused[Not start in a paused mode and wait for a debugger to connect]' \
|
'(--no-start-paused --start-paused)--no-start-paused[Not start in a paused mode and wait for a debugger to connect]' \
|
||||||
'--endless-trace-buffer[Enable tracing to an infinite buffer, instead of a ring buffer]' \
|
'--endless-trace-buffer[Enable tracing to an infinite buffer, instead of a ring buffer]' \
|
||||||
'--trace-systrace[Enable tracing to the system tracer]' \
|
'--trace-systrace[Enable tracing to the system tracer]' \
|
||||||
|
'--trace-to-file=[Write the timeline trace to a file at the specified path]:file:_files' \
|
||||||
'--trace-skia[Enable tracing of Skia code]' \
|
'--trace-skia[Enable tracing of Skia code]' \
|
||||||
'--no-enable-dart-profiling[Disable the Dart VM sampling CPU profiler]' \
|
'--no-enable-dart-profiling[Disable the Dart VM sampling CPU profiler]' \
|
||||||
'--enable-software-rendering[Enable rendering using the Skia software backend]' \
|
'--enable-software-rendering[Enable rendering using the Skia software backend]' \
|
||||||
'--skia-deterministic-rendering[When combined with --enable-software-rendering, provides 100% deterministic Skia rendering]' \
|
\*{-a,--dart-entrypoint-args=}'[Pass a list of arguments to the Dart entrypoint at application startup]: :' \
|
||||||
*{-a,--dart-entrypoint-args=}'[Pass a list of arguments to the Dart entrypoint at application startup]: :' \
|
|
||||||
'--wasm[Compile to WebAssembly rather than JavaScript]' \
|
'--wasm[Compile to WebAssembly rather than JavaScript]' \
|
||||||
'--web-tls-cert-path=[The certificate that host will use to serve using TLS connection]:cert:_files' \
|
'--web-tls-cert-path=[The certificate that host will use to serve using TLS connection]:cert:_files' \
|
||||||
'--web-tls-cert-key-path=[The certificate key that host will use to authenticate cert]:key:_files' \
|
'--web-tls-cert-key-path=[The certificate key that host will use to authenticate cert]:key:_files' \
|
||||||
'--web-launch-url=[The URL to provide to the browser]: :' \
|
'--web-launch-url=[The URL to provide to the browser]: :' \
|
||||||
'(-t= --target=)'{-t=,--target=}'[The main entry-point file of the application, as run on the device.(defaults to "lib/main.dart")]: :_files -g "*.dart"' \
|
'(-t --target=)'{-t,--target=}'[The main entry-point file of the application, as run on the device(default: "lib/main.dart")]: :_files -g "*.dart"' \
|
||||||
'--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \
|
'--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \
|
||||||
'--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \
|
'--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \
|
||||||
'--pub[Whether to run "flutter packages get" before executing this command. (defaults to on)]' \
|
'(--no-pub --pub)--pub[Run "flutter packages get" before executing this command(default: on)]' \
|
||||||
'--no-pub[Whether to run "flutter packages get" before executing this command. (defaults to on)]' \
|
'(--no-pub --pub)--no-pub[Do not run "flutter packages get" before executing this command]' \
|
||||||
'--track-widget-creation[Track widget creation locations. (defaults to on)]' \
|
'(--no-track-widget-creation --track-widget-creation)--track-widget-creation[Track widget creation locations. (defaults to on)]' \
|
||||||
'--no-track-widget-creation[Not rack widget creation locations. (defaults to on)]' \
|
'(--no-track-widget-creation --track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \
|
||||||
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
'--device-user=[Identifier number for a user or work profile on Android only]:id' \
|
||||||
'--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \
|
'--device-timeout=[Time in seconds to wait for devices to attach]:seconds' \
|
||||||
'--device-connection=[Discover devices based on connection type]: :_flutter_device_connection_types' \
|
'--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \
|
||||||
|
'--dds-port=[When this value is provided, the Dart Development Service (DDS) will be bound to the provided port]:port:' \
|
||||||
'(--no-dds --dds)--dds[Enable the Dart Developer Service]' \
|
'(--no-dds --dds)--dds[Enable the Dart Developer Service]' \
|
||||||
'(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \
|
'(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \
|
||||||
'--dds-port=[When this value is provided, the Dart Development Service (DDS) will be bound to the provided port]:port:' \
|
'(--no-android-skip-build-dependency-validation --android-skip-build-dependency-validation)--android-skip-build-dependency-validation[Skip version checking during Android builds]' \
|
||||||
|
'(--no-android-skip-build-dependency-validation --android-skip-build-dependency-validation)--no-android-skip-build-dependency-validation[Skip version checking during Android builds]' \
|
||||||
*{-P,--android-project-arg=}'[Additional arguments specified as key=value that are passed directly to the gradle project via the -P flag]: :' \
|
*{-P,--android-project-arg=}'[Additional arguments specified as key=value that are passed directly to the gradle project via the -P flag]: :' \
|
||||||
'--multidex[indicates that the app should be built with multidex support(defaults to on)]' \
|
'--android-project-cache-dir[Specify the project-specific cache directory]:dir:_file -/' \
|
||||||
'--no-multidex[indicates that the app should not be built with multidex support(defaults to on)]' \
|
|
||||||
'--ignore-deprecation[Indicates that the app should ignore deprecation warnings and continue to build using deprecated APIs]' \
|
'--ignore-deprecation[Indicates that the app should ignore deprecation warnings and continue to build using deprecated APIs]' \
|
||||||
'--no-await-first-frame-when-tracing[Just dump the trace as soon as the application is running]' \
|
'--no-await-first-frame-when-tracing[Just dump the trace as soon as the application is running]' \
|
||||||
'--use-test-fonts[Enable (and default to) the "Ahem" font]' \
|
'(--no-use-test-fonts --use-test-fonts)--use-test-fonts[Enable (and default to) the "Ahem" font]' \
|
||||||
'--no-use-test-fonts[Not enable (and default to) the "Ahem" font]' \
|
'(--no-use-test-fonts --use-test-fonts)--no-use-test-fonts[Not enable (and default to) the "Ahem" font]' \
|
||||||
'--no-build[Do not build the app before running]' \
|
'--no-build[Do not build the app before running]' \
|
||||||
'--no-hot[Run without support for hot reloading]' \
|
'--no-hot[Run without support for hot reloading]' \
|
||||||
'--pid-file=[Specify a file to write the process id to]: :_files' \
|
'--pid-file=[Specify a file to write the process id to]: :_files' \
|
||||||
|
|
@ -481,9 +475,8 @@ _flutter() {
|
||||||
'(--pub --no-pub)--no-pub[Not to run "flutter packages get" before executing this command]' \
|
'(--pub --no-pub)--no-pub[Not to run "flutter packages get" before executing this command]' \
|
||||||
'(--track-widget-creation --no-track-widget-creation)--track-widget-creation[Track widget creation locations]' \
|
'(--track-widget-creation --no-track-widget-creation)--track-widget-creation[Track widget creation locations]' \
|
||||||
'(--track-widget-creation --no-track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \
|
'(--track-widget-creation --no-track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \
|
||||||
'*--dart-define=[Additional key-value pairs that will be available as constants]:' \
|
\*{-D,--dart-define=}'[Additional key-value pairs that will be available as constants]:define' \
|
||||||
'--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \
|
'--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \
|
||||||
'--web-renderer=[The renderer implementation to use when building for the web]: :_flutter_web_renderers' \
|
|
||||||
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
||||||
'--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \
|
'--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \
|
||||||
'--name=[A regular expression matching substrings of the names of tests to run]' \
|
'--name=[A regular expression matching substrings of the names of tests to run]' \
|
||||||
|
|
@ -491,12 +484,15 @@ _flutter() {
|
||||||
*{-t,--tags=}'[Run only tests associated with the specified tags]:tag:' \
|
*{-t,--tags=}'[Run only tests associated with the specified tags]:tag:' \
|
||||||
*{-x,--exclude-tags=}'[Run only tests that do not have the specified tags]:tag:' \
|
*{-x,--exclude-tags=}'[Run only tests that do not have the specified tags]:tag:' \
|
||||||
'--start-paused[Start in a paused mode and wait for a debugger to connect]' \
|
'--start-paused[Start in a paused mode and wait for a debugger to connect]' \
|
||||||
|
'(--no-fail-fast --fail-fast)--fail-fast[Stop running tests after the first failure]' \
|
||||||
|
'(--no-fail-fast --fail-fast)--no-fail-fast[Do not stop running tests after the first failure]' \
|
||||||
'(--no-run-skipped --run-skipped)--run-skipped[Run skipped tests instead of skipping them]' \
|
'(--no-run-skipped --run-skipped)--run-skipped[Run skipped tests instead of skipping them]' \
|
||||||
'(--no-run-skipped --run-skipped)--no-run-skipped[Not run skipped tests instead of skipping them]' \
|
'(--no-run-skipped --run-skipped)--no-run-skipped[Not run skipped tests instead of skipping them]' \
|
||||||
'--coverage[Whether to collect coverage information]' \
|
'--coverage[Whether to collect coverage information]' \
|
||||||
'--merge-coverage[Whether to merge coverage data with "coverage/lcov.base.info" (Requires lcov)]' \
|
'--merge-coverage[Whether to merge coverage data with "coverage/lcov.base.info" (Requires lcov)]' \
|
||||||
'--branch-coverage[Whether to collect branch coverage information]' \
|
'--branch-coverage[Whether to collect branch coverage information]' \
|
||||||
'--coverage-path=[Where to store coverage information (if coverage is enabled). (defaults to "coverage/lcov.info")]::_files' \
|
'--coverage-path=[Where to store coverage information (if coverage is enabled). (defaults to "coverage/lcov.info")]::_files' \
|
||||||
|
'--coverage-package=[A regular expression matching packages names to include in the coverage report]:pattern' \
|
||||||
'--update-goldens[Whether "matchesGoldenFile()" calls within your test methods should update the golden files]' \
|
'--update-goldens[Whether "matchesGoldenFile()" calls within your test methods should update the golden files]' \
|
||||||
'(-j --concurrency)'{-j,--concurrency=}'[The number of concurrent test processes to run]:nums:' \
|
'(-j --concurrency)'{-j,--concurrency=}'[The number of concurrent test processes to run]:nums:' \
|
||||||
'(--test-assets --no-test-assets)--test-assets[Build the assets bundle for testing]' \
|
'(--test-assets --no-test-assets)--test-assets[Build the assets bundle for testing]' \
|
||||||
|
|
@ -504,14 +500,14 @@ _flutter() {
|
||||||
'--test-randomize-ordering-seed[The seed to randomize the execution order of test cases within test files]' \
|
'--test-randomize-ordering-seed[The seed to randomize the execution order of test cases within test files]' \
|
||||||
'--total-shards[Tests can be sharded with the "--total-shards" and "--shard-index" arguments]' \
|
'--total-shards[Tests can be sharded with the "--total-shards" and "--shard-index" arguments]' \
|
||||||
'--shard-index[Tests can be sharded with the "--total-shards" and "--shard-index" arguments]' \
|
'--shard-index[Tests can be sharded with the "--total-shards" and "--shard-index" arguments]' \
|
||||||
{-r,--reporter=}'[Set how to print test results]: :(compact expanded github json silent)' \
|
{-r,--reporter=}'[Set how to print test results]: :(compact expanded failures-only github json silent)' \
|
||||||
'--file-reporter[Enable an additional reporter writing test results to a file]' \
|
'--file-reporter[Enable an additional reporter writing test results to a file]' \
|
||||||
'--timeout=[The default test timeout, specified either in seconds (e.g. "60s"). Defaults to "30s"]:seconds:' \
|
'--timeout=[The default test timeout, specified either in seconds (e.g. "60s"). Defaults to "30s"]:seconds:' \
|
||||||
'--ignore-timeouts[Ignore all timeouts]' \
|
'--ignore-timeouts[Ignore all timeouts]' \
|
||||||
'--wasm[Compile to WebAssembly rather than JavaScript]' \
|
'--wasm[Compile to WebAssembly rather than JavaScript]' \
|
||||||
|
'--dds-port=[the Dart Development Service (DDS) will be bound to the provided port]:port:' \
|
||||||
'(--no-dds --dds)--dds[Enable the Dart Developer Service]' \
|
'(--no-dds --dds)--dds[Enable the Dart Developer Service]' \
|
||||||
'(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \
|
'(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \
|
||||||
'--dds-port=[the Dart Development Service (DDS) will be bound to the provided port]:port:' \
|
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(upgrade)
|
(upgrade)
|
||||||
|
|
@ -521,6 +517,9 @@ _flutter() {
|
||||||
'--verify-only[Checks for any new Flutter updates, without actually fetching them]' \
|
'--verify-only[Checks for any new Flutter updates, without actually fetching them]' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
|
(widget-preview)
|
||||||
|
_flutter_widget_preview && ret=0
|
||||||
|
;;
|
||||||
(*)
|
(*)
|
||||||
_arguments \
|
_arguments \
|
||||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
|
|
@ -564,6 +563,7 @@ _flutter_root_commands() {
|
||||||
'symbolize:Symbolize a stack trace from an AOT-compiled Flutter app.'
|
'symbolize:Symbolize a stack trace from an AOT-compiled Flutter app.'
|
||||||
'test:Run Flutter unit tests for the current project.'
|
'test:Run Flutter unit tests for the current project.'
|
||||||
'upgrade:Upgrade your copy of Flutter.'
|
'upgrade:Upgrade your copy of Flutter.'
|
||||||
|
'widget-preview:Manage the widget preview environment'
|
||||||
)
|
)
|
||||||
_describe -t commands 'command' commands "$@"
|
_describe -t commands 'command' commands "$@"
|
||||||
}
|
}
|
||||||
|
|
@ -574,7 +574,7 @@ _flutter_build() {
|
||||||
|
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
'1: :_flutter_build_entities' \
|
'1: :_flutter_build_subcommands' \
|
||||||
'*:: :->args' \
|
'*:: :->args' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
|
|
||||||
|
|
@ -637,8 +637,6 @@ _flutter_build() {
|
||||||
'--asset-dir[The output directory for the kernel_blob.bin file]: :_files -/'
|
'--asset-dir[The output directory for the kernel_blob.bin file]: :_files -/'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
(fuchsia)
|
|
||||||
;;
|
|
||||||
(ios)
|
(ios)
|
||||||
opts+=(
|
opts+=(
|
||||||
'--code-size-directory=[The location to write code size analysis files]: :_files -/'
|
'--code-size-directory=[The location to write code size analysis files]: :_files -/'
|
||||||
|
|
@ -647,6 +645,13 @@ _flutter_build() {
|
||||||
'--simulator[Build for the iOS simulator instead of the device]'
|
'--simulator[Build for the iOS simulator instead of the device]'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
|
(ios-framework|macos-framework)
|
||||||
|
opts+=(
|
||||||
|
'--cocoapods[Produce a Flutter.podspec instead of an engine Flutter.xcframework]'
|
||||||
|
'--plugins[Produce frameworks for the plugins]'
|
||||||
|
'--static[Build plugins as static frameworks]'
|
||||||
|
)
|
||||||
|
;;
|
||||||
(linux)
|
(linux)
|
||||||
opts+=(
|
opts+=(
|
||||||
'(--no-analyze-size)--analyze-size[Produce additional profile information for artifact output size]'
|
'(--no-analyze-size)--analyze-size[Produce additional profile information for artifact output size]'
|
||||||
|
|
@ -698,19 +703,20 @@ _flutter_build() {
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
(( $+functions[_flutter_build_entities] )) ||
|
(( $+functions[_flutter_build_subcommands] )) ||
|
||||||
_flutter_build_entities() {
|
_flutter_build_subcommands() {
|
||||||
local -a entities=(
|
local -a entities=(
|
||||||
"aar:Build a repository containing an AAR and a POM file."
|
"aar:Build a repository containing an AAR and a POM file"
|
||||||
"apk:Build an Android APK file from your app."
|
"apk:Build an Android APK file from your app"
|
||||||
"appbundle:Build an Android App Bundle file from your app."
|
"appbundle:Build an Android App Bundle file from your app"
|
||||||
"bundle:Build the Flutter assets directory from your app."
|
"bundle:Build the Flutter assets directory from your app"
|
||||||
"fuchsia:Build the Fuchsia target."
|
"ios:Build an iOS application bundle"
|
||||||
"ios:Build an iOS application bundle (Mac OS X host only)."
|
"ios-framework:Produces .xcframeworks for a Flutter project for existing, plain iOS Xcode projects"
|
||||||
"linux:Build a Linux desktop application."
|
"linux:Build a Linux desktop application"
|
||||||
"macos:Build a macOS desktop application."
|
"macos:Build a macOS desktop application"
|
||||||
|
"macos-framework:Produces .xcframeworks for a Flutter project for existing, plain macOS Xcode projects"
|
||||||
"web:Build a web application bundle"
|
"web:Build a web application bundle"
|
||||||
"windows:Build a Windows desktop application."
|
"windows:Build a Windows desktop application"
|
||||||
)
|
)
|
||||||
_describe -t entities 'entity' entities "$@"
|
_describe -t entities 'entity' entities "$@"
|
||||||
}
|
}
|
||||||
|
|
@ -758,43 +764,6 @@ _flutter_custom_devices_subcommands() {
|
||||||
_describe -t subcmds 'subcommands' subcmds "$@"
|
_describe -t subcmds 'subcommands' subcmds "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
(( $+functions[_flutter_project_templates] )) ||
|
|
||||||
_flutter_project_templates() {
|
|
||||||
local -a templates=(
|
|
||||||
"app:(default) Generate a Flutter application"
|
|
||||||
"module:Generate a shareable Flutter project containing modular Dart code"
|
|
||||||
"package:Generate a shareable Flutter project containing modular Dart code"
|
|
||||||
"plugin:Generate a shareable Flutter project containing an API in Dart code with a platform-specific implementation for Android, for iOS code, or for both"
|
|
||||||
"plugin_ffi:Generate a shareable Flutter project containing an API in Dart code with a platform-specific implementation through dart:ffi for Android, iOS, Linux, macOS, Windows, or any combination of these"
|
|
||||||
"skeleton:Generate a List View / Detail View Flutter application that follows community best practices"
|
|
||||||
)
|
|
||||||
_describe -t templates 'template' templates "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
(( $+functions[_flutter_platforms] )) ||
|
|
||||||
_flutter_platforms() {
|
|
||||||
local -a platforms=("ios" "android" "windows" "linux" "macos" "web")
|
|
||||||
_values -s , "platforms" $platforms
|
|
||||||
}
|
|
||||||
|
|
||||||
(( $+functions[_flutter_ios_languages] )) ||
|
|
||||||
_flutter_ios_languages() {
|
|
||||||
local -a languages=(
|
|
||||||
"objc:Objective-C"
|
|
||||||
"swift:(default) Swift"
|
|
||||||
)
|
|
||||||
_describe -t languages 'language' languages "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
(( $+functions[_flutter_android_languages] )) ||
|
|
||||||
_flutter_android_languages() {
|
|
||||||
local -a languages=(
|
|
||||||
"java:Java"
|
|
||||||
"kotlin:(default) Kotlin"
|
|
||||||
)
|
|
||||||
_describe -t languages 'language' languages "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
(( $+functions[_flutter_pub] )) ||
|
(( $+functions[_flutter_pub] )) ||
|
||||||
_flutter_pub() {
|
_flutter_pub() {
|
||||||
local ret=1
|
local ret=1
|
||||||
|
|
@ -874,6 +843,7 @@ _flutter_pub() {
|
||||||
'(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]' \
|
'(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]' \
|
||||||
'--skip-validation[Publish without validation and resolution]' \
|
'--skip-validation[Publish without validation and resolution]' \
|
||||||
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
||||||
|
'--ignore-warnings[Do not treat warnings as fatal]' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(run)
|
(run)
|
||||||
|
|
@ -896,6 +866,7 @@ _flutter_pub() {
|
||||||
'--precompile[Build executables in immediate dependencies]' \
|
'--precompile[Build executables in immediate dependencies]' \
|
||||||
'--unlock-transitive[Also upgrades the transitive dependencies of the listed dependencies]' \
|
'--unlock-transitive[Also upgrades the transitive dependencies of the listed dependencies]' \
|
||||||
'--major-versions[Upgrades packages to their latest resolvable versions]' \
|
'--major-versions[Upgrades packages to their latest resolvable versions]' \
|
||||||
|
'--no-example[Do not run in "example/" if it exists]' \
|
||||||
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
|
|
@ -1091,6 +1062,97 @@ _flutter_pub_token_subcommand() {
|
||||||
_describe -t subcommands 'subcommand' subcommands "$@"
|
_describe -t subcommands 'subcommand' subcommands "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(( $+functions[_flutter_widget_preview] )) ||
|
||||||
|
_flutter_widget_preview() {
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
|
\*{-v,--verbose}'[Noisy logging, including all shell commands executed]' \
|
||||||
|
'(-d --device-id)'{-d,--device-id}'[Target device id or name]:id_or_name' \
|
||||||
|
'(- *)--version[Report the version of this tool]' \
|
||||||
|
'(--enable-analytics --disable-analytics)--enable-analytics[Enable telemetry reporting each time a flutter or dart command runs]' \
|
||||||
|
'(--enable-analytics --disable-analytics)--disable-analytics[Disable telemetry reporting each time a flutter or dart command runs]' \
|
||||||
|
'--suppress-analytics[Suppress analytics reporting for the current CLI invocation]' \
|
||||||
|
'1: :_flutter_widget_preview_subcommand' \
|
||||||
|
'*:: :->arg' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(arg)
|
||||||
|
case $words[1] in
|
||||||
|
(clean)
|
||||||
|
_arguments \
|
||||||
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(start)
|
||||||
|
_arguments \
|
||||||
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
|
'(--pub --no-pub)--pub[Run "flutter packages get" after the project has been created]' \
|
||||||
|
'(--pub --no-pub)--no-pub[Do not run "flutter packages get" after the project has been created]' \
|
||||||
|
'(--offline --no-offline)--offline[Run "flutter packages get" in offline mode]' \
|
||||||
|
'(--offline --no-offline)--no-offline[Do not run "flutter packages get" in offline mode]' \
|
||||||
|
'(--web-server --no-web-server)--web-server[Serve the widget preview environment using the web-server device instead of browser]' \
|
||||||
|
'(--web-server --no-web-server)--no-web-server[Do not serve the widget preview environment using the web-server device]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_flutter_widget_preview_subcommand] )) ||
|
||||||
|
_flutter_widget_preview_subcommand() {
|
||||||
|
local -a subcommands=(
|
||||||
|
"clean:Cleans up widget preview state"
|
||||||
|
"start:Starts the widget preview environment"
|
||||||
|
)
|
||||||
|
_describe -t subcommands 'subcommand' subcommands "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Utilities
|
||||||
|
|
||||||
|
(( $+functions[_flutter_project_templates] )) ||
|
||||||
|
_flutter_project_templates() {
|
||||||
|
local -a templates=(
|
||||||
|
"app:(default) Generate a Flutter application"
|
||||||
|
"module:Generate a shareable Flutter project containing modular Dart code"
|
||||||
|
"package:Generate a shareable Dart/Flutter project containing modular Dart code"
|
||||||
|
"package_ffi:Generate a shareable Dart/Flutter project containing an API in Dart with FFI"
|
||||||
|
"plugin:Generate a shareable Flutter project containing an API in Dart code with a platform-specific implementation for Android, for iOS code, or for both"
|
||||||
|
"plugin_ffi:Generate a shareable Flutter project containing an API in Dart code with a platform-specific implementation through dart:ffi for Android, iOS, Linux, macOS, Windows, or any combination of these"
|
||||||
|
"skeleton:Generate a List View / Detail View Flutter application that follows community best practices"
|
||||||
|
)
|
||||||
|
_describe -t templates 'template' templates "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_flutter_platforms] )) ||
|
||||||
|
_flutter_platforms() {
|
||||||
|
local -a platforms=("ios" "android" "windows" "linux" "macos" "web" "darwin")
|
||||||
|
_values -s , "platforms" $platforms
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_flutter_ios_languages] )) ||
|
||||||
|
_flutter_ios_languages() {
|
||||||
|
local -a languages=(
|
||||||
|
"objc:Objective-C"
|
||||||
|
"swift:(default) Swift"
|
||||||
|
)
|
||||||
|
_describe -t languages 'language' languages "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_flutter_android_languages] )) ||
|
||||||
|
_flutter_android_languages() {
|
||||||
|
local -a languages=(
|
||||||
|
"java:Java"
|
||||||
|
"kotlin:(default) Kotlin"
|
||||||
|
)
|
||||||
|
_describe -t languages 'language' languages "$@"
|
||||||
|
}
|
||||||
|
|
||||||
(( $+functions[_flutter_web_renderers] )) ||
|
(( $+functions[_flutter_web_renderers] )) ||
|
||||||
_flutter_web_renderers() {
|
_flutter_web_renderers() {
|
||||||
local -a renderers=(
|
local -a renderers=(
|
||||||
|
|
|
||||||
174
src/_golang
174
src/_golang
|
|
@ -30,7 +30,7 @@
|
||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
#
|
#
|
||||||
# Completion script for go 1.25.0 (https://go.dev/).
|
# Completion script for go 1.26.0 (https://go.dev/).
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Authors
|
# Authors
|
||||||
|
|
@ -312,20 +312,45 @@ __go_packages() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
__go_fix_names() {
|
__go_fix_analyzers() {
|
||||||
local -a fix_names=(
|
local -a fix_analyzers=(
|
||||||
'buildtag[remove +build comments from modules using Go 1.18 or later]'
|
"any[replace interface{} with any]"
|
||||||
'cftype[fixes initializers and casts of C.*Ref and JNI types]'
|
"buildtag[check //go:build and // +build directives]"
|
||||||
'context[Change imports of golang.org/x/net/context to context]'
|
"fmtappendf[replace \[\]byte(fmt.Sprintf) with fmt.Appendf]"
|
||||||
'egl[fixes initializers of EGLDisplay]'
|
"forvar[remove redundant re-declaration of loop variables]"
|
||||||
'eglconf[fixes initializers of EGLConfig]'
|
"hostport[check format of addresses passed to net.Dial]"
|
||||||
'gotypes[change imports of oglang.org/x/tools/go{exact,types} to go/{constant,types}]'
|
"inline[apply fixes based on 'go:fix inline' comment directives]"
|
||||||
"jni[fixes initializers of JNI's jobject and subtypes]"
|
"mapsloop[replace explicit loops over maps with calls to maps package]"
|
||||||
'netipv6zone[adapt element key to IPAddr, UPDAddr, TCPAddr composite literals]'
|
"minmax[replace if/else statements with calls to min or max]"
|
||||||
'printerconfig[add element keys to Config composite literals]'
|
"newexpr[simplify code by using go1.26's new(expr)]"
|
||||||
|
"omitzero[suggest replacing omitempty with omitzero for struct fields]"
|
||||||
|
"plusbuild[remove obsolete //+build comments]"
|
||||||
|
"rangeint[replace 3-clause for loops with for-range over integers]"
|
||||||
|
"reflecttypefor[replace reflect.TypeOf(x) with TypeFor\[T\]()]"
|
||||||
|
"slicescontains[replace loops with slices.Contains or slices.ContainsFunc]"
|
||||||
|
"slicessort[replace sort.Slice with slices.Sort for basic types]"
|
||||||
|
"stditerators[use iterators instead of Len/At-style APIs]"
|
||||||
|
"stringsbuilder[replace += with strings.Builder]"
|
||||||
|
"stringscut[replace strings.Index etc. with strings.Cut]"
|
||||||
|
"stringscutprefix[replace HasPrefix/TrimPrefix with CutPrefix]"
|
||||||
|
"stringsseq[replace ranging over Split/Fields with SplitSeq/FieldsSeq]"
|
||||||
|
"testingcontext[replace context.WithCancel with t.Context in tests]"
|
||||||
|
"waitgroup[replace wg.Add(1)/go/wg.Done() with wg.Go]"
|
||||||
)
|
)
|
||||||
|
|
||||||
_values -s ',' 'fix name' $fix_names
|
_values 'analyzer' $fix_analyzers
|
||||||
|
}
|
||||||
|
|
||||||
|
__go_pprof_symbolize_types() {
|
||||||
|
local -a symbolize_types=(
|
||||||
|
"none[Do not attempt symbolization]"
|
||||||
|
"local[Examine only local binaries]"
|
||||||
|
"fastlocal[Only get function names from local binaries]"
|
||||||
|
"remote[Do not examine local binaries]"
|
||||||
|
"force[Force re-symbolization]"
|
||||||
|
)
|
||||||
|
|
||||||
|
_values 'symbolize_type' $symbolize_types
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$service" = -value-* ]]; then
|
if [[ "$service" = -value-* ]]; then
|
||||||
|
|
@ -399,6 +424,38 @@ case $state in
|
||||||
'why:explain why packages or modules are needed'
|
'why:explain why packages or modules are needed'
|
||||||
'help:get more information about a command'
|
'help:get more information about a command'
|
||||||
)
|
)
|
||||||
|
local -a fix_flags=(
|
||||||
|
'-fixtool=[specify fix analyzer]:analyzer:__go_fix_analyzers'
|
||||||
|
'-diff[display diffs instead of rewriting files]'
|
||||||
|
'-fixtool=[select analysis tool]:analyzer:'
|
||||||
|
'(- *)-V[print version and exit]'
|
||||||
|
'-any[enable any analysis]'
|
||||||
|
'-buildtag[enable buildtag analysis]'
|
||||||
|
'-c[display offending line with this many lines of content(default: -1)]:num'
|
||||||
|
'-fix[apply all suggested fixes]'
|
||||||
|
'-flags[print analyzer flags in JSON]'
|
||||||
|
'-fmtappendf[enable fmtappendf analysis]'
|
||||||
|
'-forvar[enable forvar analysis]'
|
||||||
|
'-hostport[enable hostport analysis]'
|
||||||
|
'-inline[enable inline analysis]'
|
||||||
|
'-json[emit JSON output]'
|
||||||
|
'-mapsloop[enable mapsloop analysis]'
|
||||||
|
'-minmax[enable minmax analysis]'
|
||||||
|
'-newexpr[enable newexpr analysis]'
|
||||||
|
'-omitzero[enable omitzero analysis]'
|
||||||
|
'-plusbuild[enable plusbuild analysis]'
|
||||||
|
'-rangeint[enable rangeint analysis]'
|
||||||
|
'-reflecttypefor[enable reflecttypefor analysis]'
|
||||||
|
'-slicescontains[enable slicescontains analysis]'
|
||||||
|
'-slicessort[enable slicessort analysis]'
|
||||||
|
'-stditerators[enable stditerators analysis]'
|
||||||
|
'-stringsbuilder[enable stringsbuilder analysis]'
|
||||||
|
'-stringscut[enable stringscut analysis]'
|
||||||
|
'-stringscutprefix[enable stringscutprefix analysis]'
|
||||||
|
'-stringsseq[enable stringsseq analysis]'
|
||||||
|
'-testingcontext[enable testingcontext analysis]'
|
||||||
|
'-waitgroup[enable waitgroup analysis]'
|
||||||
|
)
|
||||||
|
|
||||||
case $words[1] in
|
case $words[1] in
|
||||||
(build)
|
(build)
|
||||||
|
|
@ -532,10 +589,7 @@ case $state in
|
||||||
(fix)
|
(fix)
|
||||||
_arguments \
|
_arguments \
|
||||||
'-C[change to directory before running the command]: :_files -/' \
|
'-C[change to directory before running the command]: :_files -/' \
|
||||||
'-diff[display diffs instead of rewriting files]' \
|
$fix_flags[@] \
|
||||||
'-force[force these fixes to run even if the code looks updated]:fix_names:__go_fix_names' \
|
|
||||||
'-go[go language version for files]:version' \
|
|
||||||
'-r[restrict the rewrites to this comma-separated list]:fix_names:__go_fix_names' \
|
|
||||||
'*:importpaths:__go_packages'
|
'*:importpaths:__go_packages'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
@ -572,7 +626,6 @@ case $state in
|
||||||
(install)
|
(install)
|
||||||
_arguments \
|
_arguments \
|
||||||
${build_flags[@]} \
|
${build_flags[@]} \
|
||||||
'-json[emit install output in JSON suitable for automated processing]' \
|
|
||||||
'*:importpaths:__go_packages'
|
'*:importpaths:__go_packages'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
@ -602,7 +655,7 @@ case $state in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(mod)
|
(mod)
|
||||||
_arguments \
|
_arguments -C \
|
||||||
"1: :{_describe 'command' mod_commands}" \
|
"1: :{_describe 'command' mod_commands}" \
|
||||||
'*:: :->args'
|
'*:: :->args'
|
||||||
|
|
||||||
|
|
@ -639,8 +692,8 @@ case $state in
|
||||||
'-e[attempt to proceed despite errors encountered while loading packages]' \
|
'-e[attempt to proceed despite errors encountered while loading packages]' \
|
||||||
'-x[print the commands download executes]' \
|
'-x[print the commands download executes]' \
|
||||||
'-diff[not to modify go.mod or go.sum but instead print necessary changes as a unified diff]' \
|
'-diff[not to modify go.mod or go.sum but instead print necessary changes as a unified diff]' \
|
||||||
'-go[update the go directive in the go.mod file to the given version]:goversion' \
|
'-go=[update the go directive in the go.mod file to the given version]:goversion' \
|
||||||
'-compat[preserves additional checksums needed for the indicated Go version]:version'
|
'-compat=[preserves additional checksums needed for the indicated Go version]:version'
|
||||||
;;
|
;;
|
||||||
(vendor)
|
(vendor)
|
||||||
_arguments \
|
_arguments \
|
||||||
|
|
@ -712,6 +765,7 @@ case $state in
|
||||||
else
|
else
|
||||||
_arguments \
|
_arguments \
|
||||||
"-c[compile but don't run test]" \
|
"-c[compile but don't run test]" \
|
||||||
|
'-artifacts[save test artifacts in the directory specified by -outputdir]' \
|
||||||
'-bench[run benchmarks matching the regular expression]:regexp' \
|
'-bench[run benchmarks matching the regular expression]:regexp' \
|
||||||
'-benchmem[print memory allocation statistics for benchmarks]' \
|
'-benchmem[print memory allocation statistics for benchmarks]' \
|
||||||
'-benchtime[run benchmarks for t rime]:t' \
|
'-benchtime[run benchmarks for t rime]:t' \
|
||||||
|
|
@ -908,12 +962,12 @@ case $state in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(fix)
|
(fix)
|
||||||
_arguments \
|
if [[ $words[2] == "help" ]]; then
|
||||||
'(* -)-help[show help message]' \
|
__go_fix_analyzers
|
||||||
'-diff[display diffs instead of rewriting files]' \
|
else
|
||||||
'-force[force fixes to run even if the code looks updated]:string:__go_fix_names' \
|
_arguments \
|
||||||
'-r[restrict the rewrites]:string:__go_fix_names' \
|
"*:args:{ _alternative ':subcommand:(help)' _files }"
|
||||||
'*:files:_files'
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(link)
|
(link)
|
||||||
|
|
@ -995,15 +1049,17 @@ case $state in
|
||||||
':files:_files'
|
':files:_files'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
pprof)
|
(pprof)
|
||||||
_arguments \
|
_arguments \
|
||||||
'-callgrind[outputs a graph in callgrind format]' \
|
'-callgrind[outputs a graph in callgrind format]' \
|
||||||
|
'-comments[output all profile comments]' \
|
||||||
'-disasm=[output annotated assembly]:p' \
|
'-disasm=[output annotated assembly]:p' \
|
||||||
'-dot[outputs a graph in DOT format]' \
|
'-dot[outputs a graph in DOT format]' \
|
||||||
'-eog[visualize graph through eog]' \
|
'-eog[visualize graph through eog]' \
|
||||||
'-evince[visualize graph through evince]' \
|
'-evince[visualize graph through evince]' \
|
||||||
'-gif[outputs a graph image in GIF format]' \
|
'-gif[outputs a graph image in GIF format]' \
|
||||||
'-gv[visualize graph through gv]' \
|
'-gv[visualize graph through gv]' \
|
||||||
|
'-kcachegrind[visualize report in KCachegrind]' \
|
||||||
'-list=[output annotated source for functions matching regexp]:p' \
|
'-list=[output annotated source for functions matching regexp]:p' \
|
||||||
'-pdf[outputs a graph in PDF format]' \
|
'-pdf[outputs a graph in PDF format]' \
|
||||||
'-peek=[output callers/callees of functions matching regexp]:p' \
|
'-peek=[output callers/callees of functions matching regexp]:p' \
|
||||||
|
|
@ -1015,23 +1071,61 @@ case $state in
|
||||||
'-tags[outputs all tags in the profile]' \
|
'-tags[outputs all tags in the profile]' \
|
||||||
'-text[outputs top entries in text form]' \
|
'-text[outputs top entries in text form]' \
|
||||||
'-top[outputs top entries in text form]' \
|
'-top[outputs top entries in text form]' \
|
||||||
|
'-topproto[outputs top entries in compresses protobuf format]' \
|
||||||
|
'-traces[outputs all profile samples in text form]' \
|
||||||
'-tree[outputs a text rendering of call graph]' \
|
'-tree[outputs a text rendering of call graph]' \
|
||||||
'-web[visualize graph through web browser]' \
|
'-web[visualize graph through web browser]' \
|
||||||
'-weblist=[output annotated source in HTML]:p' \
|
'-weblist=[output annotated source in HTML]:p' \
|
||||||
|
'-call_tree[generate a context-sensitive call tree]' \
|
||||||
|
'-compact_labels[show minimal headers]' \
|
||||||
|
'-divide_by=[scale all samples by dividing them by f]:f' \
|
||||||
|
'-drop_negative[ignore negative differences]' \
|
||||||
|
'-edgefraction=[hide edges below <f>*total]:f' \
|
||||||
|
'-focus=[restricts to paths going through a node matching regexp]:r' \
|
||||||
|
'-hide=[skips nodes matching regexp]:regexp' \
|
||||||
|
'-ignore=[skips paths going through any nodes matching regexp]:r' \
|
||||||
|
'-intel_syntax[show assembly in Intel syntax]' \
|
||||||
|
'-mean[average sample value over first value]' \
|
||||||
|
'-nodecount=[max number of nodes to show]:n' \
|
||||||
|
'-nodefraction=[hide nodes below <f>*total]:f' \
|
||||||
|
'-noinlines[ignore inlines]' \
|
||||||
|
'-normalize[scales profile based on the base profile]' \
|
||||||
'-output=[generate output on file f (stdout by default)]:f' \
|
'-output=[generate output on file f (stdout by default)]:f' \
|
||||||
|
'-prune_from[drops any functions below the matched frame]' \
|
||||||
|
'-relative_percentages[show percentages relative to focused subgraph]' \
|
||||||
|
'-sample_index[index of sample value to display]' \
|
||||||
|
'-show=[only show nodes matching regexp]:regexp' \
|
||||||
|
'-show-from=[drops functions above the highest matched frame]:regexp' \
|
||||||
|
'-show-columns[show column numbers at the source code line level]' \
|
||||||
|
'-source_path=[search path for source files]:path:_files -/' \
|
||||||
|
'-tagfocus=[restrict to samples tagged with key:value matching regexp]:r' \
|
||||||
|
'-taghide=[skip tags matching this regexp]:regexp' \
|
||||||
|
'-tagignore=[discard samples tagged with key:value matching regexp]:regexp' \
|
||||||
|
'-tagleaf[add pseudo stack frames for labels key/value pairs at the callstack leaf]' \
|
||||||
|
'-tagroot[add pseudo stack frames for labels key/value pairs at the callstack root]' \
|
||||||
|
'-trim[honor nodefraction/edgefraction/nodecount defaults]' \
|
||||||
|
'-trim_path[path to trim from source paths before search]:path:_files -/' \
|
||||||
|
'-unit=[convert all samples to unit u for display]:u' \
|
||||||
'-functions[report at function level (default)]' \
|
'-functions[report at function level (default)]' \
|
||||||
|
'-filefunctions[aggregate at the file function level]' \
|
||||||
'-files[report at source file level]' \
|
'-files[report at source file level]' \
|
||||||
'-lines[report at source line level]' \
|
'-lines[report at source line level]' \
|
||||||
'-addresses[report at address level]' \
|
'-addresses[report at address level]' \
|
||||||
'-base[show delta from this profile]:profile' \
|
|
||||||
'-drop_negative[ignore negative differences]' \
|
|
||||||
'-cum[sort by cumulative data]' \
|
'-cum[sort by cumulative data]' \
|
||||||
|
'-flat[sort entries based on own weight]' \
|
||||||
'-seconds=[length of time for dynamic profiles]:n' \
|
'-seconds=[length of time for dynamic profiles]:n' \
|
||||||
'-nodecount=[max number of nodes to show]:n' \
|
'-timeout=[timeout in seconds for profile collection]:seconds' \
|
||||||
'-nodefraction=[hide nodes below <f>*total]:f' \
|
'-buildid=[override build id for main binary in profile]:id' \
|
||||||
'-edgefraction=[hide edges below <f>*total]:f' \
|
'-add_comment=[free-form annotation to add to the profile]:comment' \
|
||||||
'-sample_index[index of sample value to display]' \
|
'-diff_base=[source of base profile for comparison]:source:_files' \
|
||||||
'-mean[average sample value over first value]' \
|
'-base[show delta from this profile]:profile' \
|
||||||
|
'-symbolize=[controls source of symbol information]:source:__go_pprof_symbolize_types' \
|
||||||
|
'-tls_cert=[TLS client certificate file for fetchign profile and symbols]:file:_files' \
|
||||||
|
'-tls_key=[TLS private key file for fetching profile and symbols]:file:_files' \
|
||||||
|
'-tls_ca=[TLS CA certs file for fetching profile and symbols]:file:_files' \
|
||||||
|
'-http=[provide web interface at host:port]:host_port' \
|
||||||
|
'-no_browser[skip opening a browser for the interactive web UI]' \
|
||||||
|
'-tools=[search path for object tools]:path:_files -/' \
|
||||||
'-inuse_space[display in-use memory size]' \
|
'-inuse_space[display in-use memory size]' \
|
||||||
'-inuse_objects[display in-use object counts]' \
|
'-inuse_objects[display in-use object counts]' \
|
||||||
'-alloc_space[display allocated memory size]' \
|
'-alloc_space[display allocated memory size]' \
|
||||||
|
|
@ -1039,16 +1133,6 @@ case $state in
|
||||||
'-total_delay[display total delay at each region]' \
|
'-total_delay[display total delay at each region]' \
|
||||||
'-contentions[display number of delays at each region]' \
|
'-contentions[display number of delays at each region]' \
|
||||||
'-mean_delay[display mean delay at each region]' \
|
'-mean_delay[display mean delay at each region]' \
|
||||||
'-runtime[show runtime call frames in memory profiles]' \
|
|
||||||
'-focus=[restricts to paths going through a node matching regexp]:r' \
|
|
||||||
'-ignore=[skips paths going through any nodes matching regexp]:r' \
|
|
||||||
'-tagfocus=[restrict to samples tagged with key:value matching regexp]:r' \
|
|
||||||
'-tagignore=[discard samples tagged with key:value matching regexp]' \
|
|
||||||
'-call_tree[generate a context-sensitive call tree]' \
|
|
||||||
'-unit=[convert all samples to unit u for display]:u' \
|
|
||||||
'-divide_by=[scale all samples by dividing them by f]:f' \
|
|
||||||
'-buildid=[override build id for main binary in profile]:id' \
|
|
||||||
'-tools=[search path for object-level tools]:path' \
|
|
||||||
'-help[help message]' \
|
'-help[help message]' \
|
||||||
'*:files:_files'
|
'*:files:_files'
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
#
|
#
|
||||||
# Completion script for Node.js v25.4.0 (https://nodejs.org)
|
# Completion script for Node.js v25.5.0 (https://nodejs.org)
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Authors
|
# Authors
|
||||||
|
|
@ -84,6 +84,7 @@ _node() {
|
||||||
'--allow-net[allow use of network when any permissions are set]' \
|
'--allow-net[allow use of network when any permissions are set]' \
|
||||||
'--allow-wasi[allow wasi when any permissions are set]' \
|
'--allow-wasi[allow wasi when any permissions are set]' \
|
||||||
'--allow-worker[allow worker threads when any permissions are set]' \
|
'--allow-worker[allow worker threads when any permissions are set]' \
|
||||||
|
'--build-sea=[Build a Node.js single executable application]:sea_config:_files -g "*.json"' \
|
||||||
'--build-snapshot[generate a snapshot blob when the process exits]' \
|
'--build-snapshot[generate a snapshot blob when the process exits]' \
|
||||||
'--build-snapshot-config=[generate a snapshot blob when the process exits using a JSON configuration in the specified path]:path:_files' \
|
'--build-snapshot-config=[generate a snapshot blob when the process exits using a JSON configuration in the specified path]:path:_files' \
|
||||||
{-c,--check}'[syntax check script without executing]' \
|
{-c,--check}'[syntax check script without executing]' \
|
||||||
|
|
|
||||||
|
|
@ -990,7 +990,7 @@ _openssl_enc() {
|
||||||
'-out[output file name]:file:_files' \
|
'-out[output file name]:file:_files' \
|
||||||
'-pass[password source]:source:_openssl_pass_phrase_options' \
|
'-pass[password source]:source:_openssl_pass_phrase_options' \
|
||||||
'-e[encrypt the input data(default behavior)]' \
|
'-e[encrypt the input data(default behavior)]' \
|
||||||
'-e[decrypt the input data]' \
|
'-d[decrypt the input data]' \
|
||||||
'(-a -base64)'{-a,-base64}'[Base64 proess the data]' \
|
'(-a -base64)'{-a,-base64}'[Base64 proess the data]' \
|
||||||
'-A[base64 encoding produces output without any newline character]' \
|
'-A[base64 encoding produces output without any newline character]' \
|
||||||
'-k[password to derive the key from]:password' \
|
'-k[password to derive the key from]:password' \
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,233 @@
|
||||||
|
#compdef openvpn-install openvpn-install.sh
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
# a copy of this software and associated documentation files (the
|
||||||
|
# "Software"), to deal in the Software without restriction, including
|
||||||
|
# without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
# permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
# the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
# OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
#
|
||||||
|
# Completion script for openvpn-install (https://github.com/angristan/openvpn-install)
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Authors
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
_openvpn_install() {
|
||||||
|
typeset -A opt_args
|
||||||
|
local context state line
|
||||||
|
|
||||||
|
local curcontext="$curcontext"
|
||||||
|
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'--verbose[show detailed output]' \
|
||||||
|
'(--log --no-log)--log[log file path]:file:_files' \
|
||||||
|
'(--log --no-log)--no-log[disable file logging]' \
|
||||||
|
'--no-color[disable colored output]' \
|
||||||
|
'(- *)'{-h,--help}'[show help]' \
|
||||||
|
'1: :_openvpn_install_commands' \
|
||||||
|
'*:: :->args' \
|
||||||
|
&& ret=0;
|
||||||
|
|
||||||
|
case "$state" in
|
||||||
|
(args)
|
||||||
|
case $words[1] in
|
||||||
|
(install)
|
||||||
|
local -a dns_providers=(
|
||||||
|
system unbound cloudflare quad9 quad9-uncensored
|
||||||
|
fdn dnswatch opendns google yandex adguard nextdns custom
|
||||||
|
)
|
||||||
|
|
||||||
|
local -a ciphers=(
|
||||||
|
AES-128-GCM AES-192-GCM AES-256-GCM AES-128-CBC
|
||||||
|
AES-192-CBC AES-256-CBC CHACHA20-POLY1305
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments \
|
||||||
|
'(-i --interactive)'{-i,--interactive}'[run interactive install wizard]' \
|
||||||
|
'--endpoint[public IP or hostname for clients]:host_or_ip' \
|
||||||
|
'--endpoint-type[endpoint IP version(default: 4)]:version:(4 6)' \
|
||||||
|
'--ip[server listening IP]:addr' \
|
||||||
|
'(--client-ipv4 --no-client-ipv4)--client-ipv4[enable IPv4 for VPN clients]' \
|
||||||
|
'(--client-ipv4 --no-client-ipv4)--no-client-ipv4[disable IPv4 for VPN clients]' \
|
||||||
|
'(--client-ipv6 --no-client-ipv6)--client-ipv6[enable IPv6 for VPN clients]' \
|
||||||
|
'(--client-ipv6 --no-client-ipv6)--no-client-ipv6[disable IPv6 for VPN clients]' \
|
||||||
|
'--subnet-ipv4[IPv4 VPN subnet(default: 10.8.0.0)]:subnet' \
|
||||||
|
'--subnet-ipv6[IPv6 VPN subnet(default: fd42:42:42:42::)]:subnet' \
|
||||||
|
'(--port --port-random)--port[OpenVPN port]:port' \
|
||||||
|
'(--port --port-random)--port-random[use random port(49152-65535)]:port' \
|
||||||
|
'--protocol[UDP or TCP(default: udp)]:proto:(udp tcp)' \
|
||||||
|
'--mtu[tunnel MTU(default: 1500)]:size' \
|
||||||
|
'--dns[DNS provider(default: cloudflare)]:provider:(($dns_providers))' \
|
||||||
|
'--dns-primary[custom primary DNS]:ip' \
|
||||||
|
'--dns-secondary[custom secondary DNS]:ip' \
|
||||||
|
'--cipher[data channel cipher(default: AES-128-GCM)]:cipher:(($ciphers))' \
|
||||||
|
'--cert-type[certificate type(default: ecdsa)]:type:(ecdsa rsa)' \
|
||||||
|
'--cert-curve[ECDSA curve(default: prime256v1)]:curve:(prime256v1 secp384r1 secp521r1)' \
|
||||||
|
'--rsa-bits[RSA key size(default: 2048)]:size:(2048 3072 4096)' \
|
||||||
|
'--cc-cipher[control channel cipher]:cipher' \
|
||||||
|
'--tls-version-min[minimum TLS version(default: 1.2)]:min_ver:(1.2 1.3)' \
|
||||||
|
'--tls-ciphersuites[TLS 1.3 cipher suites, colon-separated]:list' \
|
||||||
|
'--tls-groups[key exchange groups, colon-separated]:list' \
|
||||||
|
'--hmac[HMAC algorithm(default: SHA256)]:alg:(SHA256 SHA384 SHA512)' \
|
||||||
|
'--tls-sig[TLS mode(default: crypt-v2)]:mode:(crypt-v2 crypt auth)' \
|
||||||
|
'--server-cert-days[server cert validity in days(default: 3650)]:days' \
|
||||||
|
'--multi-client[allow same cert on multiple devices]' \
|
||||||
|
'--client[initial client name(default: client)]:name' \
|
||||||
|
'--client-password[password-protect client]:password' \
|
||||||
|
'--client-cert-days[client cert validity in days(default: 3650)]:days' \
|
||||||
|
'--no-client[skip initial client creation]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(uninstall)
|
||||||
|
_arguments \
|
||||||
|
'(-f --force)'{-f,--force}'[skip confirmation prompt]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(client)
|
||||||
|
_openvpn_install_client && ret=0
|
||||||
|
;;
|
||||||
|
(server)
|
||||||
|
_openvpn_install_server && ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_openvpn_install_commands() {
|
||||||
|
local -a commands=(
|
||||||
|
'install:Install and configure OpenVPN server'
|
||||||
|
'uninstall:Remove OpenVPN server'
|
||||||
|
'client:Manage client certificates'
|
||||||
|
'server:Server management'
|
||||||
|
'interactive:Launch interactive menu'
|
||||||
|
)
|
||||||
|
|
||||||
|
_describe -t 'commands' 'commands' commands
|
||||||
|
}
|
||||||
|
|
||||||
|
_openvpn_install_client() {
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
|
'1: :_openvpn_install_client_commands' \
|
||||||
|
'*:: :->args' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(args)
|
||||||
|
case $words[1] in
|
||||||
|
(add)
|
||||||
|
_arguments \
|
||||||
|
'--password[password-protect client]:password' \
|
||||||
|
'--cert-days[certificate validity in days(default: 3650)]:days' \
|
||||||
|
'--output[output path for .ovpn file(default: ~/<name>.ovpn)]:file:_files' \
|
||||||
|
'1:name' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(list)
|
||||||
|
_arguments \
|
||||||
|
'--format[output format(default: table)]:format:(table json)' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(revoke)
|
||||||
|
_arguments \
|
||||||
|
'(-f --force)'{-f,--force}'[skip confirmation/warning]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(renew)
|
||||||
|
_arguments \
|
||||||
|
'--cert-days[new certificate validity in days(default: 3650)]:days' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_openvpn_install_client_commands() {
|
||||||
|
local -a commands=(
|
||||||
|
'add:add a new client'
|
||||||
|
'list:list all clients'
|
||||||
|
'revoke:revoke a client certificate'
|
||||||
|
'renew:renew a client certificate'
|
||||||
|
)
|
||||||
|
|
||||||
|
_describe -t commands 'command' commands "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
_openvpn_install_server() {
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||||
|
'1: :_openvpn_install_server_commands' \
|
||||||
|
'*:: :->args' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(args)
|
||||||
|
case $words[1] in
|
||||||
|
(status)
|
||||||
|
_arguments \
|
||||||
|
'--format[output format(default: table)]:format:(table json)' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(renew)
|
||||||
|
_arguments \
|
||||||
|
'--cert-days[new certificate validity in days(default: 3650)]:days' \
|
||||||
|
'(-f --force)'{-f,--force}'[skip confirmation/warning]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_openvpn_install_server_commands() {
|
||||||
|
local -a commands=(
|
||||||
|
'status:list currently connected clients'
|
||||||
|
'renew:renew server certificate'
|
||||||
|
)
|
||||||
|
_describe -t commands 'command' commands "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
_openvpn_install "$@"
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: Shell-Script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# sh-basic-offset: 2
|
||||||
|
# End:
|
||||||
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
Loading…
Reference in New Issue