#compdef cargo-leptos autoload -U is-at-least _cargo-leptos() { typeset -A opt_args typeset -a _arguments_options local ret=1 if is-at-least 5.2; then _arguments_options=(-s -S -C) else _arguments_options=(-s -C) fi local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" : \ '--manifest-path=[Path to Cargo.toml]:MANIFEST_PATH:_default' \ '*--log=[Output logs from dependencies (multiple --log accepted)]:LOG:((wasm\:"WASM build (wasm, wasm-opt, walrus)" server\:"Internal reload and csr server (hyper, axum)"))' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ '--version[Print version]' \ ":: :_cargo-leptos_commands" \ "*::: :->cargo-leptos" \ && ret=0 case $state in (cargo-leptos) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:cargo-leptos-command-$line[1]:" case $line[1] in (build) _arguments "${_arguments_options[@]}" : \ '-p+[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '--project=[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '*--features=[The features to use when compiling all targets]:FEATURES:_default' \ '*--lib-features=[The features to use when compiling the lib target]:LIB_FEATURES:_default' \ '*--lib-cargo-args=[The cargo flags to pass to cargo when compiling the lib target]:LIB_CARGO_ARGS:_default' \ '*--bin-features=[The features to use when compiling the bin target]:BIN_FEATURES:_default' \ '*--bin-cargo-args=[The cargo flags to pass to cargo when compiling the bin target]:BIN_CARGO_ARGS:_default' \ '--js-minify=[Minify javascript assets with swc. Applies to release builds only]:JS_MINIFY:(true false)' \ '-r[Build artifacts in release mode, with optimizations]' \ '--release[Build artifacts in release mode, with optimizations]' \ '-P[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--precompress[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--hot-reload[Turn on partial hot-reloading. Requires rust nightly \[beta\]]' \ '--wasm-debug[Include debug information in Wasm output. Includes source maps and DWARF debug info]' \ '*-v[Verbosity (none\: info, errors & warnings, -v\: verbose, -vv\: very verbose)]' \ '-c[Clear the terminal before rebuilding]' \ '--clear[Clear the terminal before rebuilding]' \ '--split[Split WASM binary based on #\[lazy\] macros]' \ '--frontend-only[Only build the frontend]' \ '(--frontend-only)--server-only[Only build the server]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (test) _arguments "${_arguments_options[@]}" : \ '-p+[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '--project=[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '*--features=[The features to use when compiling all targets]:FEATURES:_default' \ '*--lib-features=[The features to use when compiling the lib target]:LIB_FEATURES:_default' \ '*--lib-cargo-args=[The cargo flags to pass to cargo when compiling the lib target]:LIB_CARGO_ARGS:_default' \ '*--bin-features=[The features to use when compiling the bin target]:BIN_FEATURES:_default' \ '*--bin-cargo-args=[The cargo flags to pass to cargo when compiling the bin target]:BIN_CARGO_ARGS:_default' \ '--js-minify=[Minify javascript assets with swc. Applies to release builds only]:JS_MINIFY:(true false)' \ '-r[Build artifacts in release mode, with optimizations]' \ '--release[Build artifacts in release mode, with optimizations]' \ '-P[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--precompress[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--hot-reload[Turn on partial hot-reloading. Requires rust nightly \[beta\]]' \ '--wasm-debug[Include debug information in Wasm output. Includes source maps and DWARF debug info]' \ '*-v[Verbosity (none\: info, errors & warnings, -v\: verbose, -vv\: very verbose)]' \ '-c[Clear the terminal before rebuilding]' \ '--clear[Clear the terminal before rebuilding]' \ '--split[Split WASM binary based on #\[lazy\] macros]' \ '--frontend-only[Only build the frontend]' \ '(--frontend-only)--server-only[Only build the server]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (end-to-end) _arguments "${_arguments_options[@]}" : \ '-p+[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '--project=[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '*--features=[The features to use when compiling all targets]:FEATURES:_default' \ '*--lib-features=[The features to use when compiling the lib target]:LIB_FEATURES:_default' \ '*--lib-cargo-args=[The cargo flags to pass to cargo when compiling the lib target]:LIB_CARGO_ARGS:_default' \ '*--bin-features=[The features to use when compiling the bin target]:BIN_FEATURES:_default' \ '*--bin-cargo-args=[The cargo flags to pass to cargo when compiling the bin target]:BIN_CARGO_ARGS:_default' \ '--js-minify=[Minify javascript assets with swc. Applies to release builds only]:JS_MINIFY:(true false)' \ '-r[Build artifacts in release mode, with optimizations]' \ '--release[Build artifacts in release mode, with optimizations]' \ '-P[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--precompress[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--hot-reload[Turn on partial hot-reloading. Requires rust nightly \[beta\]]' \ '--wasm-debug[Include debug information in Wasm output. Includes source maps and DWARF debug info]' \ '*-v[Verbosity (none\: info, errors & warnings, -v\: verbose, -vv\: very verbose)]' \ '-c[Clear the terminal before rebuilding]' \ '--clear[Clear the terminal before rebuilding]' \ '--split[Split WASM binary based on #\[lazy\] macros]' \ '--frontend-only[Only build the frontend]' \ '(--frontend-only)--server-only[Only build the server]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (serve) _arguments "${_arguments_options[@]}" : \ '-p+[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '--project=[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '*--features=[The features to use when compiling all targets]:FEATURES:_default' \ '*--lib-features=[The features to use when compiling the lib target]:LIB_FEATURES:_default' \ '*--lib-cargo-args=[The cargo flags to pass to cargo when compiling the lib target]:LIB_CARGO_ARGS:_default' \ '*--bin-features=[The features to use when compiling the bin target]:BIN_FEATURES:_default' \ '*--bin-cargo-args=[The cargo flags to pass to cargo when compiling the bin target]:BIN_CARGO_ARGS:_default' \ '--js-minify=[Minify javascript assets with swc. Applies to release builds only]:JS_MINIFY:(true false)' \ '-r[Build artifacts in release mode, with optimizations]' \ '--release[Build artifacts in release mode, with optimizations]' \ '-P[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--precompress[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--hot-reload[Turn on partial hot-reloading. Requires rust nightly \[beta\]]' \ '--wasm-debug[Include debug information in Wasm output. Includes source maps and DWARF debug info]' \ '*-v[Verbosity (none\: info, errors & warnings, -v\: verbose, -vv\: very verbose)]' \ '-c[Clear the terminal before rebuilding]' \ '--clear[Clear the terminal before rebuilding]' \ '--split[Split WASM binary based on #\[lazy\] macros]' \ '--frontend-only[Only build the frontend]' \ '(--frontend-only)--server-only[Only build the server]' \ '-h[Print help]' \ '--help[Print help]' \ '*::bin_args:_default' \ && ret=0 ;; (watch) _arguments "${_arguments_options[@]}" : \ '-p+[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '--project=[Which project to use, from a list of projects defined in a workspace]:PROJECT:_default' \ '*--features=[The features to use when compiling all targets]:FEATURES:_default' \ '*--lib-features=[The features to use when compiling the lib target]:LIB_FEATURES:_default' \ '*--lib-cargo-args=[The cargo flags to pass to cargo when compiling the lib target]:LIB_CARGO_ARGS:_default' \ '*--bin-features=[The features to use when compiling the bin target]:BIN_FEATURES:_default' \ '*--bin-cargo-args=[The cargo flags to pass to cargo when compiling the bin target]:BIN_CARGO_ARGS:_default' \ '--js-minify=[Minify javascript assets with swc. Applies to release builds only]:JS_MINIFY:(true false)' \ '-r[Build artifacts in release mode, with optimizations]' \ '--release[Build artifacts in release mode, with optimizations]' \ '-P[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--precompress[Precompress static assets with gzip and brotli. Applies to release builds only]' \ '--hot-reload[Turn on partial hot-reloading. Requires rust nightly \[beta\]]' \ '--wasm-debug[Include debug information in Wasm output. Includes source maps and DWARF debug info]' \ '*-v[Verbosity (none\: info, errors & warnings, -v\: verbose, -vv\: very verbose)]' \ '-c[Clear the terminal before rebuilding]' \ '--clear[Clear the terminal before rebuilding]' \ '--split[Split WASM binary based on #\[lazy\] macros]' \ '--frontend-only[Only build the frontend]' \ '(--frontend-only)--server-only[Only build the server]' \ '-h[Print help]' \ '--help[Print help]' \ '*::bin_args:_default' \ && ret=0 ;; (new) _arguments "${_arguments_options[@]}" : \ '-g+[Git repository to clone template from. Can be a full URL (like \`https\://github.com/leptos-rs/start\`), or a shortcut for one of our built-in templates\: \`leptos-rs/start\`, \`leptos-rs/start-axum\`, \`leptos-rs/start-axum-workspace\`, or \`leptos-rs/start-aws\`]:GIT:_default' \ '--git=[Git repository to clone template from. Can be a full URL (like \`https\://github.com/leptos-rs/start\`), or a shortcut for one of our built-in templates\: \`leptos-rs/start\`, \`leptos-rs/start-axum\`, \`leptos-rs/start-axum-workspace\`, or \`leptos-rs/start-aws\`]:GIT:_default' \ '(-t --tag)-b+[Branch to use when installing from git]:BRANCH:_default' \ '(-t --tag)--branch=[Branch to use when installing from git]:BRANCH:_default' \ '(-b --branch)-t+[Tag to use when installing from git]:TAG:_default' \ '(-b --branch)--tag=[Tag to use when installing from git]:TAG:_default' \ '-p+[Local path to copy the template from. Can not be specified together with --git]:PATH:_default' \ '--path=[Local path to copy the template from. Can not be specified together with --git]:PATH:_default' \ '-n+[Directory to create / project name; if the name isn'\''t in kebab-case, it will be converted to kebab-case unless \`--force\` is given]:NAME:_default' \ '--name=[Directory to create / project name; if the name isn'\''t in kebab-case, it will be converted to kebab-case unless \`--force\` is given]:NAME:_default' \ '-f[Don'\''t convert the project name to kebab-case before creating the directory. Note that cargo generate won'\''t overwrite an existing directory, even if \`--force\` is given]' \ '--force[Don'\''t convert the project name to kebab-case before creating the directory. Note that cargo generate won'\''t overwrite an existing directory, even if \`--force\` is given]' \ '-v[Enables more verbose output]' \ '--verbose[Enables more verbose output]' \ '--init[Generate the template directly into the current dir. No subfolder will be created and no vcs is initialized]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (completions) _arguments "${_arguments_options[@]}" : \ '-h[Print help]' \ '--help[Print help]' \ ':shell:(bash elvish fish powershell zsh)' \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" : \ ":: :_cargo-leptos__help_commands" \ "*::: :->help" \ && ret=0 case $state in (help) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:cargo-leptos-help-command-$line[1]:" case $line[1] in (build) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (test) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (end-to-end) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (serve) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (watch) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (new) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (completions) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; esac ;; esac ;; esac ;; esac } (( $+functions[_cargo-leptos_commands] )) || _cargo-leptos_commands() { local commands; commands=( 'build:Build the server (feature ssr) and the client (wasm with feature hydrate)' \ 'test:Run the cargo tests for app, client and server' \ 'end-to-end:Start the server and end-2-end tests' \ 'serve:Serve. Defaults to hydrate mode' \ 'watch:Serve and automatically reload when files change' \ 'new:Start a wizard for creating a new project (using cargo-generate)' \ 'completions:Generate shell for \`cargo-leptos\`' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'cargo-leptos commands' commands "$@" } (( $+functions[_cargo-leptos__build_commands] )) || _cargo-leptos__build_commands() { local commands; commands=() _describe -t commands 'cargo-leptos build commands' commands "$@" } (( $+functions[_cargo-leptos__completions_commands] )) || _cargo-leptos__completions_commands() { local commands; commands=() _describe -t commands 'cargo-leptos completions commands' commands "$@" } (( $+functions[_cargo-leptos__end-to-end_commands] )) || _cargo-leptos__end-to-end_commands() { local commands; commands=() _describe -t commands 'cargo-leptos end-to-end commands' commands "$@" } (( $+functions[_cargo-leptos__help_commands] )) || _cargo-leptos__help_commands() { local commands; commands=( 'build:Build the server (feature ssr) and the client (wasm with feature hydrate)' \ 'test:Run the cargo tests for app, client and server' \ 'end-to-end:Start the server and end-2-end tests' \ 'serve:Serve. Defaults to hydrate mode' \ 'watch:Serve and automatically reload when files change' \ 'new:Start a wizard for creating a new project (using cargo-generate)' \ 'completions:Generate shell for \`cargo-leptos\`' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'cargo-leptos help commands' commands "$@" } (( $+functions[_cargo-leptos__help__build_commands] )) || _cargo-leptos__help__build_commands() { local commands; commands=() _describe -t commands 'cargo-leptos help build commands' commands "$@" } (( $+functions[_cargo-leptos__help__completions_commands] )) || _cargo-leptos__help__completions_commands() { local commands; commands=() _describe -t commands 'cargo-leptos help completions commands' commands "$@" } (( $+functions[_cargo-leptos__help__end-to-end_commands] )) || _cargo-leptos__help__end-to-end_commands() { local commands; commands=() _describe -t commands 'cargo-leptos help end-to-end commands' commands "$@" } (( $+functions[_cargo-leptos__help__help_commands] )) || _cargo-leptos__help__help_commands() { local commands; commands=() _describe -t commands 'cargo-leptos help help commands' commands "$@" } (( $+functions[_cargo-leptos__help__new_commands] )) || _cargo-leptos__help__new_commands() { local commands; commands=() _describe -t commands 'cargo-leptos help new commands' commands "$@" } (( $+functions[_cargo-leptos__help__serve_commands] )) || _cargo-leptos__help__serve_commands() { local commands; commands=() _describe -t commands 'cargo-leptos help serve commands' commands "$@" } (( $+functions[_cargo-leptos__help__test_commands] )) || _cargo-leptos__help__test_commands() { local commands; commands=() _describe -t commands 'cargo-leptos help test commands' commands "$@" } (( $+functions[_cargo-leptos__help__watch_commands] )) || _cargo-leptos__help__watch_commands() { local commands; commands=() _describe -t commands 'cargo-leptos help watch commands' commands "$@" } (( $+functions[_cargo-leptos__new_commands] )) || _cargo-leptos__new_commands() { local commands; commands=() _describe -t commands 'cargo-leptos new commands' commands "$@" } (( $+functions[_cargo-leptos__serve_commands] )) || _cargo-leptos__serve_commands() { local commands; commands=() _describe -t commands 'cargo-leptos serve commands' commands "$@" } (( $+functions[_cargo-leptos__test_commands] )) || _cargo-leptos__test_commands() { local commands; commands=() _describe -t commands 'cargo-leptos test commands' commands "$@" } (( $+functions[_cargo-leptos__watch_commands] )) || _cargo-leptos__watch_commands() { local commands; commands=() _describe -t commands 'cargo-leptos watch commands' commands "$@" } if [ "$funcstack[1]" = "_cargo-leptos" ]; then _cargo-leptos "$@" else compdef _cargo-leptos cargo-leptos fi