Skip to content

Commit

Permalink
Don't show a "Command not found" error message if there is no command
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertAudi committed Mar 31, 2019
1 parent f1ce9dd commit 914f5da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/bin/tsm
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ function __tsm::main() {
if [[ -n "$cmd" ]] && (( ${+__tsm_commands[$cmd]} )); then
__tsm::commands::"$cmd" "${@:2}"
else
__tsm::utils::log error "Command not found: $(__tsm::utils::colorize bold,white "$cmd")"
[[ -n "$cmd" ]] && __tsm::utils::log error "Command not found: $(__tsm::utils::colorize bold,white "$cmd")"
__tsm::commands::help
return 1
fi
Expand Down
2 changes: 1 addition & 1 deletion src/main.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function __tsm::main() {
if [[ -n "$cmd" ]] && (( ${+__tsm_commands[$cmd]} )); then
__tsm::commands::"$cmd" "${@:2}"
else
__tsm::utils::log error "Command not found: $(__tsm::utils::colorize bold,white "$cmd")"
[[ -n "$cmd" ]] && __tsm::utils::log error "Command not found: $(__tsm::utils::colorize bold,white "$cmd")"
__tsm::commands::help
return 1
fi
Expand Down

0 comments on commit 914f5da

Please sign in to comment.