2021-03-18 00:30:04 +03:00
|
|
|
function _tide_remove_unusable_items
|
|
|
|
# Remove tool-specific items for tools the machine doesn't have installed
|
2021-11-25 02:45:48 +03:00
|
|
|
set -l removed_items
|
2022-04-25 20:40:50 +03:00
|
|
|
for item in aws chruby docker git go java kubectl node php rustc terraform toolbox virtual_env
|
2021-06-03 23:12:38 +03:00
|
|
|
set -l cli_names $item
|
2021-03-18 00:30:04 +03:00
|
|
|
switch $item
|
|
|
|
case virtual_env
|
2021-06-03 23:12:38 +03:00
|
|
|
set cli_names python python3
|
2021-03-18 00:30:04 +03:00
|
|
|
end
|
2021-11-25 02:45:48 +03:00
|
|
|
type --query $cli_names || set -a removed_items $item
|
2021-03-18 00:30:04 +03:00
|
|
|
end
|
2021-11-25 02:45:48 +03:00
|
|
|
|
|
|
|
set -U _tide_left_items (for item in $tide_left_prompt_items
|
|
|
|
contains $item $removed_items || echo $item
|
|
|
|
end)
|
|
|
|
set -U _tide_right_items (for item in $tide_right_prompt_items
|
|
|
|
contains $item $removed_items || echo $item
|
|
|
|
end)
|
2021-03-18 00:30:04 +03:00
|
|
|
end
|