Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions examples/colors/colorly
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,7 @@ run() {
declare -A args
parse_requirements "$@"

if [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
colorly_usage
elif [[ $action == "root" ]]; then
if [[ $action == "root" ]]; then
root_command
fi
}
Expand Down
5 changes: 0 additions & 5 deletions examples/command-default/ftp
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,6 @@ run() {
ftp_download_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
ftp_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
5 changes: 0 additions & 5 deletions examples/command-groups/ftp
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,6 @@ run() {
ftp_logout_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
ftp_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
5 changes: 0 additions & 5 deletions examples/commands-nested/cli
Original file line number Diff line number Diff line change
Expand Up @@ -790,11 +790,6 @@ run() {
cli_file_edit_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
cli_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
5 changes: 0 additions & 5 deletions examples/commands/cli
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,6 @@ run() {
cli_upload_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
cli_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
5 changes: 0 additions & 5 deletions examples/config-ini/configly
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,6 @@ run() {
configly_list_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
configly_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
7 changes: 1 addition & 6 deletions examples/custom-includes/download
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,7 @@ run() {
declare -A args
parse_requirements "$@"

if [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
download_usage
elif [[ $action == "root" ]]; then
if [[ $action == "root" ]]; then
root_command
fi
}
Expand Down
7 changes: 1 addition & 6 deletions examples/custom-strings/download
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,7 @@ run() {
declare -A args
parse_requirements "$@"

if [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
download_usage
elif [[ $action == "root" ]]; then
if [[ $action == "root" ]]; then
root_command
fi
}
Expand Down
7 changes: 1 addition & 6 deletions examples/default-values/convert
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,7 @@ run() {
declare -A args
parse_requirements "$@"

if [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
convert_usage
elif [[ $action == "root" ]]; then
if [[ $action == "root" ]]; then
root_command
fi
}
Expand Down
5 changes: 0 additions & 5 deletions examples/dependencies/cli
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,6 @@ run() {
cli_upload_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
cli_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
5 changes: 0 additions & 5 deletions examples/docker-like/docker
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,6 @@ run() {
docker_image_ls_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
docker_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
5 changes: 0 additions & 5 deletions examples/environment-variables/cli
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,6 @@ run() {
cli_verify_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
cli_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
5 changes: 0 additions & 5 deletions examples/git-like/git
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,6 @@ run() {
git_commit_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
git_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
7 changes: 1 addition & 6 deletions examples/minimal/download
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,7 @@ run() {
declare -A args
parse_requirements "$@"

if [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
download_usage
elif [[ $action == "root" ]]; then
if [[ $action == "root" ]]; then
root_command
fi
}
Expand Down
7 changes: 1 addition & 6 deletions examples/minus-v/cli
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,7 @@ run() {
declare -A args
parse_requirements "$@"

if [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
cli_usage
elif [[ $action == "root" ]]; then
if [[ $action == "root" ]]; then
root_command
fi
}
Expand Down
5 changes: 0 additions & 5 deletions examples/multiline/multi
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,6 @@ run() {
multi_regular_command
fi

elif [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
multi_usage
elif [[ $action == "root" ]]; then
root_command
fi
Expand Down
7 changes: 1 addition & 6 deletions examples/yaml/yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,7 @@ run() {
declare -A args
parse_requirements "$@"

if [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
yaml_usage
elif [[ $action == "root" ]]; then
if [[ $action == "root" ]]; then
root_command
fi
}
Expand Down
7 changes: 1 addition & 6 deletions lib/bashly/views/command/run.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ run() {
fi
<% condition = "elif" %>
<%- end -%>
<%= condition %> [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
<%= name %>_usage
elif [[ $action == "root" ]]; then
<%= condition %> [[ $action == "root" ]]; then
root_command
fi
}
7 changes: 1 addition & 6 deletions spec/fixtures/workspaces/flag-args-with-dash/argflag
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,7 @@ run() {
declare -A args
parse_requirements "$@"

if [[ ${args[--version]} ]]; then
version_command
elif [[ ${args[--help]} ]]; then
long_usage=yes
argflag_usage
elif [[ $action == "root" ]]; then
if [[ $action == "root" ]]; then
root_command
fi
}
Expand Down