Skip to content

Commit

Permalink
refactor: better prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
adoyle-h committed May 30, 2023
1 parent cd01e71 commit f326d06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions bash/mod.bash
Expand Up @@ -106,13 +106,15 @@ disable_mod() {
}

disable_it() {
local name

if [[ ${1:-} == --all ]]; then
for name in $(list_enabled "$t"); do
disable_mod "$name" || echo "Failed to enable '$name'."
disable_mod "$name" || echo "Failed to disable '$name'."
done
else
for name in "$@"; do
disable_mod "$name" || echo "Failed to enable '$name'."
disable_mod "$name" || echo "Failed to disable '$name'."
done
fi
}
Expand Down
2 changes: 1 addition & 1 deletion bin/one
Expand Up @@ -119,7 +119,7 @@ one_cmd() {
local cmd_path="$ONE_DIR/one-cmds/$cmd"

if [[ ! -x $cmd_path ]]; then
echo "Not found executable file '$cmd_path'" >&2
echo "No such command '$cmd'" >&2
return "$ONE_EX_USAGE"
fi

Expand Down

0 comments on commit f326d06

Please sign in to comment.