Skip to content

Commit 85ffd1e

Browse files
soburinashif
authored andcommitted
scripts: west_commands: completion: fash: Add support for west sdk
Add a feature for completion of the `west sdk` command. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent af5850d commit 85ffd1e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

scripts/west_commands/completion/west-completion.fish

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ function __zephyr_west_complete_help
179179
"attach" "interactively debug a board" \
180180
"zephyr-export" "export Zephyr installation as a CMake config package" \
181181
"spdx" "create SPDX bill of materials" \
182-
"blobs" "work with binary blobs"
182+
"blobs" "work with binary blobs" \
183+
"sdk" "manage SDKs"
183184
set -l nb_ext_cmds (count $ext_cmds)
184185

185186
if __zephyr_west_check_if_in_workspace
@@ -501,3 +502,16 @@ complete -c west -n "__zephyr_west_use_subcommand; and __zephyr_west_check_if_in
501502
complete -c west -n "__zephyr_west_seen_subcommand_from blobs; and not __fish_seen_subcommand_from list fetch clean" -ra "list\t'list binary blobs' fetch\t'fetch binary blobs' clean\t'clean working tree of binary blobs'"
502503
complete -c west -n "__zephyr_west_seen_subcommand_from blobs; and __fish_seen_subcommand_from list fetch clean" -ra "(__zephyr_west_complete_projects)"
503504
complete -c west -n "__zephyr_west_seen_subcommand_from blobs; and not __fish_seen_subcommand_from fetch clean" -o f -l format -r -d "format string"
505+
506+
# sdk
507+
complete -c west -n "__zephyr_west_use_subcommand; and __zephyr_west_check_if_in_workspace" -ra sdk -d "manage SDKs"
508+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and not __fish_seen_subcommand_from list install" -ra "list\t'list installed SDKs' install\t'install SDK'"
509+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -l version -d "version of the Zephyr SDK to install"
510+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -o b -l install-base -d "SDK isntall base directory"
511+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -o d -l install-dir -d "SDK isntall destination directory"
512+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -o i -l interactive -d "interactive"
513+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -o t -l toolchains -d "toolchain(s) to install"
514+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -o T -l no-toolchains -d "do not install toolchains"
515+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -o H -l no-hosttools -d "do not install host-tools"
516+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -l personal-access-token -d "GitHub personal access token"
517+
complete -c west -n "__zephyr_west_seen_subcommand_from sdk; and __fish_seen_subcommand_from install" -l api-url -d "GitHub releases API endpoint URL"

0 commit comments

Comments
 (0)