Skip to content

Commit

Permalink
Fix the check to see if a command exists
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertAudi committed Mar 31, 2019
1 parent fc61aa0 commit ceca790
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 @@ -948,7 +948,7 @@ function __tsm::commands::version() {
function __tsm::main() {
local cmd="$1"
[[ "$cmd" == "tsm" ]] && { __tsm::commands::tsm ; return $status }
if [[ -n "$cmd" ]] && (( ${+__tsm_commands[(k)$cmd]} )); then
if [[ -n "$cmd" ]] && (( ${+__tsm_commands[$cmd]} )); then
__tsm::commands::"$cmd" "${@:2}"
else
__tsm::commands::help
Expand Down
2 changes: 1 addition & 1 deletion src/main.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
function __tsm::main() {
local cmd="$1"
[[ "$cmd" == "tsm" ]] && { __tsm::commands::tsm ; return $status }
if [[ -n "$cmd" ]] && (( ${+__tsm_commands[(k)$cmd]} )); then
if [[ -n "$cmd" ]] && (( ${+__tsm_commands[$cmd]} )); then
__tsm::commands::"$cmd" "${@:2}"
else
__tsm::commands::help
Expand Down

0 comments on commit ceca790

Please sign in to comment.