diff --git a/README.md b/README.md index b065a4d..843183a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ First, alias the `qub` command to the following: ``` -alias qub="curl -fsSL https://raw.githubusercontent.com/jamonholmgren/qub/main/src/cli.sh | bash -s --" +alias qub="source <(curl -sSL https://raw.githubusercontent.com/jamonholmgren/qub/main/src/cli.sh)" ``` Now, you should be able to run it like so: diff --git a/src/cli.sh b/src/cli.sh index 8f7e7cd..efecec0 100755 --- a/src/cli.sh +++ b/src/cli.sh @@ -45,25 +45,6 @@ main() { return 0 fi - # Help command if provided -h or --help - - if [[ $1 == "-h" || $1 == "--help" ]]; then - echo "Usage: qub [command] [options]" - echo "" - echo "Commands:" - echo " create Create a new Qub QB64 web project" - echo " setup-server Set up remote server for deployment (coming soon)" - echo "" - echo "Options:" - echo " -h, --help Show help" - echo " -v, --version Show version number" - echo "" - echo "Examples:" - echo " qub create" - echo "" - return 0 - fi - # Create command if [[ $1 == "create" ]]; then @@ -181,6 +162,27 @@ main() { return 0 fi + + # Otherwise, print help + + # Help command if provided -h or --help + + echo "Usage: qub [command|option]" + echo "" + echo "Commands:" + echo " create Create a new Qub QB64 web project" + echo "" + echo "Options:" + echo " -h, --help Show help" + echo " -v, --version Show version number" + echo "" + echo "Examples:" + echo " qub create" + echo "" + echo "If you need more help, please visit:" + echo " https://github.com/jamonholmgren/qub" + echo "" + return 0 } main "$@"