Update flutter and dart completion
This commit is contained in:
parent
75094d7275
commit
2a2efae5f6
50
src/_dart
50
src/_dart
|
@ -24,7 +24,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for dart 3.0.5. (https://dart.dev/)
|
||||
# Completion script for dart 3.1.0 (https://dart.dev/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
@ -119,21 +119,7 @@ _dart() {
|
|||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Show all options and flags with --help]' \
|
||||
'(-o --output)'{-o,--output}'[Set where to write formatted output]:format:_dart_format_output' \
|
||||
'--show[Set which filenames to print]:show:_dart_format_show' \
|
||||
'--summary[Show the specified summary after formatting]:summary:_dart_format_summary' \
|
||||
'--set-exit-if-changed[Return exit code 1 if there are any formatting changes]' \
|
||||
'--fix[Apply all style fixes]' \
|
||||
'--fix-doc-comments[Use triple slash for documentation comments]' \
|
||||
'--fix-function-typedefs[Use new syntax for function type typedefs]' \
|
||||
'--fix-named-default-separator[Use "=" as the separator before named parameter default values]' \
|
||||
'--fix-optional-const[Remove "const" keyword inside constant context]' \
|
||||
'--fix-optional-new[Remove "new" keyword]' \
|
||||
'--fix-single-cascade-statements[Remove unnecessary single cascades from expression statements]' \
|
||||
'(-i --indent)'{-i,--indent}'[Add this many spaces of leading indentation(default to 0)]' \
|
||||
'--follow-links[Follow links to files and directories]' \
|
||||
'(- *)--version[Show dart_style version]' \
|
||||
'--selection[Track selection through formatting]:start_length' \
|
||||
'--stdin-name[Use this path in error messages when input is read from stdin(defaults to "stdin")]:name' \
|
||||
'*:file_or_directory:_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
|
@ -275,33 +261,13 @@ _dart_compile_subcommands() {
|
|||
|
||||
(( $+functions[_dart_format_output] )) ||
|
||||
_dart_format_output() {
|
||||
local -a options=(
|
||||
local -a outputs=(
|
||||
"json:Print code and selection as JSON"
|
||||
"none:Discard output"
|
||||
"show:Print code to terminal"
|
||||
"write:Overwrite formatted files on disk"
|
||||
"write:Overwrite formatted files on disk(default)"
|
||||
)
|
||||
_describe -t options 'command' options "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_format_show] )) ||
|
||||
_dart_format_show() {
|
||||
local -a options=(
|
||||
"all:All visited files and directories"
|
||||
"changed:Only the names of files whose formatting is changed"
|
||||
"none:No file names or directories"
|
||||
)
|
||||
_describe -t options 'command' options "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_format_summary] )) ||
|
||||
_dart_format_summary() {
|
||||
local -a options=(
|
||||
"line:Single-line summary"
|
||||
"none:No summary"
|
||||
"profile:How long it took for format each file"
|
||||
)
|
||||
_describe -t options 'command' options "$@"
|
||||
_describe -t outputs 'output' outputs "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub] )) ||
|
||||
|
@ -574,19 +540,19 @@ _dart_pub_token_subcommands() {
|
|||
|
||||
(( $+functions[_dart_run_timeline_streams] )) ||
|
||||
_dart_run_timeline_streams() {
|
||||
local -a options=(all API Compiler CompilerVerbose Dart Debugger Embedder GC Isolate VM)
|
||||
_values -s ',' streams $options
|
||||
local -a streams=(all API Compiler CompilerVerbose Dart Debugger Embedder GC Isolate VM)
|
||||
_values -s ',' streams $streams
|
||||
}
|
||||
|
||||
(( $+functions[_dart_test_reporter] )) ||
|
||||
_dart_test_reporter() {
|
||||
local -a options=(
|
||||
local -a reporters=(
|
||||
"compact:A single line, updated continuously"
|
||||
"expanded:A separate line for each update"
|
||||
"github:A custom reporter for GitHub Actions"
|
||||
"json:A machine-readable format"
|
||||
)
|
||||
_describe -t options 'command' options "$@"
|
||||
_describe -t reporters 'reporter' reporters "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_subcommands] )) ||
|
||||
|
|
171
src/_flutter
171
src/_flutter
|
@ -25,7 +25,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for the Flutter.io sdk's cli tool 3.10.0 (https://flutter.dev)
|
||||
# Completion script for the Flutter.io sdk's cli tool 3.13.0 (https://flutter.dev)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
@ -59,11 +59,15 @@ _flutter() {
|
|||
'(--no-version-check --version-check)--version-check[Allow Flutter to check for updates when this command runs]' \
|
||||
'(--version-check --no-version-check)--no-version-check[Not allow Flutter to check for updates when this command runs]' \
|
||||
'--suppress-analytics[Suppress analytics reporting when this command runs]' \
|
||||
'(--enable-telemetry)--disable-telemetry[Disable telemetry reporting each time a flutter command runs]' \
|
||||
'(--disable-telemetry)--enable-telemetry[Enable telemetry reporting each time a flutter command runs]' \
|
||||
'--packages[Path to your ".packages" file. (required, since the current directory does not contain a ".packages" file)]' \
|
||||
'--local-engine-src-path=[Path to your engine src directory]: :_path_files -/' \
|
||||
'--local-engine=[Name of a build output within the engine out directory]' \
|
||||
'--local-engine=[Specific version of the engine]:version' \
|
||||
'--local-web-sdk=[Specific version of the Web SDK]:version' \
|
||||
'--show-test-device=[List the special "flutter-tester" device in device listings]' \
|
||||
'--show-web-server-device=[List the special "web-server" device in device listings]' \
|
||||
'--ci[Enable a set of CI-specific test debug settings]' \
|
||||
'1: :_flutter_root_commands' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
@ -103,7 +107,7 @@ _flutter() {
|
|||
{-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'
|
||||
'--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"' \
|
||||
|
@ -118,7 +122,7 @@ _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"' \
|
||||
'--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:' \
|
||||
'*--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 format file where flutter define a global constant pool]: :_files -g "*.json"' \
|
||||
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
||||
'--null-assertions[Perform additional null assertions on the boundaries of migrated and un-migrated code]' \
|
||||
|
@ -130,6 +134,7 @@ _flutter() {
|
|||
'--no-track-widget-creation[Not rack widget creation locations. (defaults to on)]' \
|
||||
'--dds-port=[When this value is provided, the Dart Development Service (DDS) will be bound to the provided port]:port:' \
|
||||
'--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' \
|
||||
&& ret=0
|
||||
;;
|
||||
(bash-completion)
|
||||
|
@ -150,6 +155,7 @@ _flutter() {
|
|||
'--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 -/' \
|
||||
'--android-studio-dir=[The Android Studio install directory]: :_path_files -/' \
|
||||
'--jdk-dir=[The Java Development Kit installation directory]: :_path_files -/' \
|
||||
'--build-dir=[The relative path to override a projects build directory]: :_path_files -/' \
|
||||
'(--no-enable-web --enable-web)--enable-web[Enable Flutter for web]' \
|
||||
'(--no-enable-web --enable-web)--no-enable-web[Disable Flutter for web]' \
|
||||
|
@ -159,8 +165,6 @@ _flutter() {
|
|||
'(--no-enable-macos-desktop --enable-macos-desktop)--no-enable-macos-desktop[Disable support for desktop on macOS]' \
|
||||
'(--no-enable-windows-desktop --enable-windows-desktop)--enable-windows-desktop[Enable support for desktop on Windows]' \
|
||||
'(--no-enable-windows-desktop --enable-windows-desktop)--no-enable-windows-desktop[Disable support for desktop on Windows]' \
|
||||
'(--no-enable-windows-uwp-desktop --enable-windows-uwp-desktop)--enable-windows-uwp-desktop[Enable support for desktop on Windows UWP]' \
|
||||
'(--no-enable-windows-uwp-desktop --enable-windows-uwp-desktop)--no-enable-windows-uwp-desktop[Disable support for desktop on Windows UWP]' \
|
||||
'(--no-single-widget-reload-optimization --single-widget-reload-optimization)--single-widget-reload-optimization[Enable Hot reload optimization for a single widget]' \
|
||||
'(--no-single-widget-reload-optimization --single-widget-reload-optimization)--no-single-widget-reload-optimization[Disable Hot reload optimization for a single widget]' \
|
||||
'(--no-enable-android --enable-android)--enable-android[Enable Flutter for Android]' \
|
||||
|
@ -170,7 +174,7 @@ _flutter() {
|
|||
'(--no-enable-fuchsia --enable-fuchsia)--enable-fuchsia[Enable Flutter for Fuchsia]' \
|
||||
'(--no-enable-fuchsia --enable-fuchsia)--no-enable-fuchsia[Disable Flutter for Fuchsia]' \
|
||||
'(--no-enable-custom-devices --enable-custom-devices)--enable-custom-devices[Enable Early support for custom device types]' \
|
||||
'(--no-enable-custom-devices --enable-custom-devices)--no-custom-devices[Disable Early support for custom device types]' \
|
||||
'(--no-enable-custom-devices --enable-custom-devices)--no-enable-custom-devices[Disable Early support for custom device types]' \
|
||||
'--clear-features[Remove all configured features and restore them to the default values]' \
|
||||
&& ret=0
|
||||
;;
|
||||
|
@ -178,12 +182,12 @@ _flutter() {
|
|||
(create)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--pub[Whether to run "flutter packages get" after the project has been created. (defaults to on)]' \
|
||||
'--no-pub[Whether to run "flutter packages get" after the project has been created. (defaults to on)]' \
|
||||
'--offline[Offline mode when "flutter packages get" is run]' \
|
||||
'--no-offline[Offline mode when "flutter packages get" is run]' \
|
||||
'--overwrite[When performing operations, overwrite existing files]' \
|
||||
'--no-overwrite[When performing operations, not overwrite existing files]' \
|
||||
'(--pub --no-pub)--pub[Whether to 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)]' \
|
||||
'(--offline --no-offline)--offline[Offline mode when "flutter packages get" is run]' \
|
||||
'(--offline --no-offline)--no-offline[Offline mode when "flutter packages get" is run]' \
|
||||
'(--overwrite --no-overwrite)--overwrite[When performing operations, 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.')]::" \
|
||||
"--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:' \
|
||||
|
@ -193,7 +197,7 @@ _flutter() {
|
|||
'(-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]' \
|
||||
'--list-samples=[Specifies a JSON output file for a listing of Flutter code samples that can be created with "--sample"]::_path_files' \
|
||||
'--list-samples=[Specifies a JSON output file for a listing of Flutter code samples that can be created with "--sample"]: :_path_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(custom-devices)
|
||||
|
@ -218,6 +222,7 @@ _flutter() {
|
|||
'(- *)'{-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-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \
|
||||
&& ret=0
|
||||
;;
|
||||
(doctor)
|
||||
|
@ -232,9 +237,10 @@ _flutter() {
|
|||
'--debug[Build a debug version of your app (default mode)]' \
|
||||
'--profile[Build a version of your app specialized for performance profiling]' \
|
||||
'--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]:' \
|
||||
'--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]: :(auto canvaskit html)' \
|
||||
'--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]' \
|
||||
'--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)--no-cache-startup-profile[Not caches the CPU profile collected before the first frame for startup analysis]' \
|
||||
|
@ -249,6 +255,9 @@ _flutter() {
|
|||
'--endless-trace-buffer[Enable tracing to an infinite buffer, instead of a ring buffer]' \
|
||||
'--trace-systrace[Enable tracing to the system tracer]' \
|
||||
'--trace-skia[Enable tracing of Skia code]' \
|
||||
'--no-enable-dart-profiling[Disable the Dart VM sampling CPU profiler]' \
|
||||
'--enable-software-rendering[Enable rendering using the Skia software backend]' \
|
||||
'--skia-deterministic-rendering[provide completely deterministic Skia rendering]' \
|
||||
*{-a,--dart-entrypoint-args=}'[Pass a list of arguments to the Dart entrypoint at application startup]: :' \
|
||||
'--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"' \
|
||||
|
@ -258,10 +267,9 @@ _flutter() {
|
|||
'--no-pub[Whether to run "flutter packages get" before executing this command. (defaults to on)]' \
|
||||
'--track-widget-creation[Track widget creation locations. (defaults to on)]' \
|
||||
'--no-track-widget-creation[Not rack widget creation locations. (defaults to on)]' \
|
||||
'--null-assertions[Perform additional null assertions on the boundaries of migrated and un-migrated code]' \
|
||||
'--no-null-assertions[Not perform additional null assertions on the boundaries of migrated and un-migrated code]' \
|
||||
'--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-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \
|
||||
'--dds-port=[the Dart Development Service (DDS) will be bound to the provided port]:port:' \
|
||||
*{-P,--android-project-arg=}'[Additional arguments specified as key=value that are passed directly to the gradle project]: :' \
|
||||
'--multidex[indicates that the app should be built with multidex support(defaults to on)]' \
|
||||
|
@ -284,6 +292,7 @@ _flutter() {
|
|||
'--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]: :' \
|
||||
'--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' \
|
||||
&& ret=0
|
||||
;;
|
||||
(emulators)
|
||||
|
@ -328,10 +337,11 @@ _flutter() {
|
|||
'--debug[Build a debug version of your app]' \
|
||||
'--profile[Build a version of your app specialized for performance profiling]' \
|
||||
'--release[Build a release version of your app(default mode)]' \
|
||||
'--use-application-binary=[Specify a prebuild application binary to use when running]: :_files -g "*.apk"'
|
||||
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
||||
'--use-application-binary=[Specify a prebuild application binary to use when running]: :_files -g "*.apk"' \
|
||||
'--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \
|
||||
'--flavor[Build a custom app flavors as defined by platform-specific build setup]:flavor'
|
||||
'--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \
|
||||
'--device-user=[Identifier number for a user or work profile on Android only]:id:' \
|
||||
'--flavor[Build a custom app flavors as defined by platform-specific build setup]:flavor' \
|
||||
'(--no-uninstall-only --uninstall-only)--uninstall-only[Uninstall the app if already on the device. Skip install]' \
|
||||
'(--no-uninstall-only --uninstall-only)--no-uninstall-only[Uninstall the app if already on the device. Skip install]' \
|
||||
&& ret=0
|
||||
|
@ -341,6 +351,7 @@ _flutter() {
|
|||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-c --clear)'{-c,--clear}'[Clear log history before reading from logs]' \
|
||||
'--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' \
|
||||
&& ret=0
|
||||
;;
|
||||
(precache)
|
||||
|
@ -356,8 +367,6 @@ _flutter() {
|
|||
'(--no-linux --linux)--no-linux[Not recache artifacts for Linux desktop development]' \
|
||||
'(--no-windows --windows)--windows[Precache artifacts for Windows desktop development]' \
|
||||
'(--no-windows --windows)--no-windows[Not precache artifacts for Windows desktop development]' \
|
||||
'(--no-winuwp --winuwp)--winuwp[Precache artifacts for Windows UWP desktop development]' \
|
||||
'(--no-winuwp --winuwp)--no-winuwp[Not recache artifacts for Windows UWP desktop development]' \
|
||||
'(--no-macos --macos)--macos[Precache artifacts for macOS desktop development]' \
|
||||
'(--no-macos --macos)--no-macos[Not precache artifacts for macOS desktop development]' \
|
||||
'(--no-fuchsia --fuchsia)--fuchsia[Precache artifacts for Fuchsia development]' \
|
||||
|
@ -375,9 +384,11 @@ _flutter() {
|
|||
'--debug[Build a debug version of your app (default mode)]' \
|
||||
'--profile[Build a version of your app specialized for performance profiling]' \
|
||||
'--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]: ' \
|
||||
'--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]: :(auto canvaskit html)' \
|
||||
'--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]' \
|
||||
'--use-application-binary=[Specify a pre-built-application binary to use when running]: :_files' \
|
||||
'--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)--no-cache-startup-profile[Not caches the CPU profile collected before the first frame for startup analysis]' \
|
||||
|
@ -386,12 +397,14 @@ _flutter() {
|
|||
'--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]' \
|
||||
'--route[Which route to load when running the app]' \
|
||||
'--use-application-binary=[Specify a pre-built application binary to use when running]::_files -g "*.apk"' \
|
||||
'(--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]' \
|
||||
'--endless-trace-buffer[Enable tracing to an infinite buffer, instead of a ring buffer]' \
|
||||
'--trace-systrace[Enable tracing to the system tracer]' \
|
||||
'--trace-skia[Enable tracing of Skia code]' \
|
||||
'--no-enable-dart-profiling[Disable the Dart VM sampling CPU profiler]' \
|
||||
'--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]: :' \
|
||||
'--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"' \
|
||||
|
@ -401,25 +414,19 @@ _flutter() {
|
|||
'--no-pub[Whether to run "flutter packages get" before executing this command. (defaults to on)]' \
|
||||
'--track-widget-creation[Track widget creation locations. (defaults to on)]' \
|
||||
'--no-track-widget-creation[Not rack widget creation locations. (defaults to on)]' \
|
||||
'--null-assertions[Perform additional null assertions on the boundaries of migrated and un-migrated code]' \
|
||||
'--no-null-assertions[Not perform additional null assertions on the boundaries of migrated and un-migrated code]' \
|
||||
'--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-connection=[Discover devices based on connection 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:' \
|
||||
*{-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)]' \
|
||||
'--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]' \
|
||||
'--enable-software-rendering[Enable rendering using the Skia software backend]' \
|
||||
'--skia-deterministic-rendering[When combined with --enable-software-rendering, provides 100% deterministic Skia rendering]' \
|
||||
'--await-first-frame-when-tracing[Wait for the first frame when tracing startup ("--trace-startup")(defaults to on)]' \
|
||||
'--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[Not enable (and default to) the "Ahem" font]' \
|
||||
'--build[If necessary, build the app before running. (defaults to on)]' \
|
||||
'--no-build[If necessary, build the app before running. (defaults to on)]' \
|
||||
'--hot[Run with support for hot reloading. (defaults to on)]' \
|
||||
'--no-hot[Run with support for hot reloading. (defaults to on)]' \
|
||||
'--no-build[Do not build the app before running]' \
|
||||
'--no-hot[Run without support for hot reloading]' \
|
||||
'--pid-file=[Specify a file to write the process id to]: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
|
@ -427,9 +434,10 @@ _flutter() {
|
|||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-o --out)'{-o,--out=}'[Location to write the screenshot]: :_files' \
|
||||
'--observatory-url=[The Observatory URL to which to connect]:uri:' \
|
||||
'--type=[The type of screenshot to retrieve]: :(device rasterizer skia)' \
|
||||
'--vm-service-url=[The VM Service URL to which to connect]' \
|
||||
'--type=[The type of screenshot to retrieve]:type:(device rasterizer skia)' \
|
||||
'--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' \
|
||||
&& ret=0
|
||||
;;
|
||||
(symbolize)
|
||||
|
@ -445,12 +453,11 @@ _flutter() {
|
|||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--pub[Run "flutter packages get" before executing this command(defaults to on)]' \
|
||||
'--no-pub[Not to run "flutter packages get" before executing this command]' \
|
||||
'--null-assertions[Perform additional null assertions on the boundaries of migrated and un-migrated code]' \
|
||||
'--no-null-assertions[Not perform additional null assertions on the boundaries of migrated and un-migrated code]' \
|
||||
'--track-widget-creation[Track widget creation locations]' \
|
||||
'--no-track-widget-creation[Not track widget creation locations]' \
|
||||
'*--dart-define=[Additional key-value pairs that will be available as constants]: :' \
|
||||
'--web-renderer[The renderer implementation to use when building for the web]: :(auto canvaskit html)' \
|
||||
'*--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"' \
|
||||
'--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:' \
|
||||
'--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]' \
|
||||
|
@ -458,19 +465,21 @@ _flutter() {
|
|||
*{-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:' \
|
||||
'--start-paused[Start in a paused mode and wait for a debugger to connect]' \
|
||||
'--run-skipped[Run skipped tests instead of skipping them]' \
|
||||
'--no-run-skipped[Not 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]' \
|
||||
'--coverage[Whether to collect coverage information]' \
|
||||
'--merge-coverage[Whether to merge coverage data with "coverage/lcov.base.info" (Requires lcov)]' \
|
||||
'--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' \
|
||||
'--update-goldens[Whether "matchesGoldenFile()" calls within your test methods should update the golden files]' \
|
||||
{-j,--concurrency=}'[The number of concurrent test processes to run]:nums:' \
|
||||
'--test-assets[Build the assets bundle for testing]' \
|
||||
'--no-test-assets[Not build the assets bundle for testing]' \
|
||||
'(-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)--no-test-assets[Not build the assets bundle for testing]' \
|
||||
'--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]' \
|
||||
'--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)' \
|
||||
'--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:' \
|
||||
'--dds-port=[the Dart Development Service (DDS) will be bound to the provided port]:port:' \
|
||||
&& ret=0
|
||||
|
@ -565,6 +574,7 @@ _flutter_build() {
|
|||
(aar)
|
||||
opts+=(
|
||||
'--target-platform=[The target platform for which the project is compiled]: :(android-arm android-arm64 android-x86 android-x64)'
|
||||
\*{-P,--android-project-arg}'[Additioanl arguments specified as key=value that are passed to gradle -P option]:arg'
|
||||
)
|
||||
;;
|
||||
(apk|appbundle)
|
||||
|
@ -579,7 +589,11 @@ _flutter_build() {
|
|||
'--split-per-abi[Split the APKs per ABIs]'
|
||||
'--target-platform=[The target platform for which the project is compiled]: :(android-arm android-arm64 android-x86 android-x64)'
|
||||
)
|
||||
if [[ $words[1] == "appbundle" ]]; then
|
||||
if [[ $words[1] == "apk" ]]; then
|
||||
opts+=(
|
||||
'--config-only[Generate build files used by flutter but do not build any artifacts]'
|
||||
)
|
||||
else
|
||||
opts+=(
|
||||
'--no-deferred-components[Disable building with deferred components]'
|
||||
'--no-validate-deferred-components[Do not validate deferred component]'
|
||||
|
@ -597,6 +611,7 @@ _flutter_build() {
|
|||
;;
|
||||
(ios)
|
||||
opts+=(
|
||||
'--code-size-directory=[The location to write code size analysis files]: :_files -/'
|
||||
'--no-codesign[Do not codesign the application bundle]'
|
||||
'--config-only[Update the project configuration without performing a build]'
|
||||
'--simulator[Build for the iOS simulator instead of the device]'
|
||||
|
@ -604,14 +619,11 @@ _flutter_build() {
|
|||
;;
|
||||
(linux)
|
||||
opts+=(
|
||||
'--build-name=[A string used as the version number shown to users]:build_name'
|
||||
'(--no-analyze-size)--analyze-size[Produce additional profile information for artifact output size]'
|
||||
'(--analyze-size)--no-analyze-size[Not produce additional profile information for artifact output size]'
|
||||
'--code-size-directory=[The location to write code size analysis files]: :_files -/'
|
||||
\*{-P,--android-project-arg}'[Additioanl arguments specified as key=value that are passed to gradle -P option]:arg'
|
||||
'--no-multidex[the app is not built with multidex support]'
|
||||
'--ignore-deprecation[the app should ignore deprecation warnings and continue to build using deprecated APIs]'
|
||||
'--split-per-abi[Split the APKs per ABIs]'
|
||||
'(-t --target)'{-t,--target=}'[The main entry-point file of the application]:file:_files'
|
||||
'--build-name=[A string used as the version number shown to users]:build_name'
|
||||
'--target-platform=[The target platform for which the project is compiled]: :(linux-arm64 linux-x64)'
|
||||
'--target-sysroot=[The root filesystem path of target platform]: :_files -/'
|
||||
)
|
||||
|
@ -624,23 +636,25 @@ _flutter_build() {
|
|||
;;
|
||||
(web)
|
||||
opts+=(
|
||||
'(--no-null-assertions)--null-assertions[Perform additional null assertions on the boundaries of migrated and un-migrated code]'
|
||||
'(--null-assertions)--no-null-assertions[Not perform additional null assertions on the boundaries of migrated and un-migrated code]'
|
||||
'(-t --target)'{-t,--target=}'[The main entry-point file of the application]:file:_files'
|
||||
'--no-native-null-assertions[Disable additional runtime null checks in web applications]'
|
||||
'--base-href[Overrides the href attribute of the base tag in web/index.html]'
|
||||
'--pwa-strategy=[The caching strategy to be used by the PWA service worker]: :(none offline-first)'
|
||||
'--web-renderer=[The renderer implementation to use when building for the web]: :_flutter_web_renderers'
|
||||
'(--no-web-resources-cdn)--web-resources-cdn[Use Web static resources hosted on a CDN]'
|
||||
'(--web-resources-cdn)--no-web-resources-cdn[Do not Web static resources hosted on a CDN]'
|
||||
'--csp[Disable dynamic generation of code in the generated output]'
|
||||
'(--no-source-maps)--source-maps[Generate a sourcemap file]'
|
||||
'(--source-maps)--no-source-maps[Do not generate a sourcemap file]'
|
||||
'--pwa-strategy=The caching strategy to be used by the PWA service worker: :(none offline-first)'
|
||||
'--web-renderer[The renderer implementation to use when building for the web]: :(auto canvaskit html)'
|
||||
'(--no-web-resources-cdn)--web-resources-cdn[Use Web static resources hosted on a CDN]'
|
||||
'(--web-resources-cdn)--no-web-resources-cdn[Do not Web static resources hosted on a CDN]'
|
||||
'--base-href[Overrides the href attribute of the base tag in web/index.html]'
|
||||
'--dart2js-optimization=[Sets the optimization level used for Dart compilation to JavaScript]: :(O0 O1 O2 O3 O4)'
|
||||
'--dump-info[Passes "--dump-info" to the JavaScript compiler]'
|
||||
'--no-frequency-based-minification[Disables the frequency based minifier]'
|
||||
)
|
||||
;;
|
||||
(windows)
|
||||
opts+=(
|
||||
'--build-name=[A string used as the version number shown to users]:build_name'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -812,7 +826,6 @@ _flutter_pub() {
|
|||
'(--no-dev-dependencies)--dev-dependencies[Take the dependencies into account]' \
|
||||
'(--dev-dependencies)--no-dev-dependencies[Not take the dependencies into account]' \
|
||||
'--json[Output the results using a json format]' \
|
||||
'--mode=[Highlight versions with PROPERTY]:property:(null-safety)' \
|
||||
'(--no-prereleases)--prereleases[Include prereleases in latest version]' \
|
||||
'(--prereleases)--no-prereleases[Not include prereleases in latest version]' \
|
||||
'--show-all[Include dependencies that are already fulfilling --mode]' \
|
||||
|
@ -825,6 +838,7 @@ _flutter_pub() {
|
|||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' \
|
||||
'(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]' \
|
||||
'--skip-validation[Publish without validation and resolution]' \
|
||||
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
|
@ -833,25 +847,29 @@ _flutter_pub() {
|
|||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--enable-asserts[Enable assert statements]' \
|
||||
'--enable-experiment=[Run the executable in a VM with the given experiments enabled]:experiment' \
|
||||
'(--no-sound-null-safety)--sound-null-safety[Enable the null safety execution mode]' \
|
||||
'(--sound-null-safety)--no-sound-null-safety[Disable the null safety execution mode]' \
|
||||
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
(token)
|
||||
_flutter_pub_token && ret=0
|
||||
;;
|
||||
(run)
|
||||
(upgrade)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--offline[Use cached packages instead of accessing the network]' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' \
|
||||
'--precompile[Build executables in immediate dependencies]' \
|
||||
'--null-safety[Upgrade constraints in pubspec.yaml to null-safety versions]' \
|
||||
'--major-versions[Upgrades packages to their latest resolvable versions]' \
|
||||
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
(uploader)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--package=[The package whose uploaders will be modified]:package' \
|
||||
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
(*)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
|
@ -966,8 +984,6 @@ _flutter_pub_global() {
|
|||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--enable-asserts[Enable assert statements]' \
|
||||
'--enable-experiment=[Run the executable in a VM with the given experiments enabled]' \
|
||||
'(--no-sound-null-safety)--sound-null-safety[Enable the null safety execution mode]' \
|
||||
'(--sound-null-safety)--no-sound-null-safety[Disable the null safety execution mode]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(*)
|
||||
|
@ -1005,7 +1021,7 @@ _flutter_pub_token() {
|
|||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(activate)
|
||||
(add)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--env-var[Read the secret token from this environment variable when making requests]:env' \
|
||||
|
@ -1038,6 +1054,27 @@ _flutter_pub_token_subcommand() {
|
|||
_describe -t subcommands 'subcommand' subcommands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_flutter_web_renderers] )) ||
|
||||
_flutter_web_renderers() {
|
||||
local -a renderers=(
|
||||
'auto:HTML renderer on mobile devices'
|
||||
'canvaskit:CanvasKit renderer'
|
||||
'html:HTML renderer'
|
||||
'skwasm:Experimental skwasm renderer'
|
||||
)
|
||||
_describe -t renderers 'renderers' renderers "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_flutter_device_connection_types] )) ||
|
||||
_flutter_device_connection_types() {
|
||||
local -a types=(
|
||||
'attached:Only searches for devices connected by USB or built-in'
|
||||
'both:Searches for both attached and wireless devices'
|
||||
'wireless:Only searches for devices connected wirelessly'
|
||||
)
|
||||
_describe -t types 'types' types "$@"
|
||||
}
|
||||
|
||||
_flutter "$@"
|
||||
|
||||
# Local Variables:
|
||||
|
|
Loading…
Reference in New Issue