diff --git a/persoconf/main.py b/persoconf/main.py index f9bb9ba..bc1b570 100755 --- a/persoconf/main.py +++ b/persoconf/main.py @@ -37,7 +37,7 @@ parser.add_argument( "--rootdir", type=str, help="The persoconf directory to use parser.add_argument( '--verbose', help='Spout out more logs', action="store_true") -subparsers = parser.add_subparsers( dest="command", title="commands", description="Valid commands" ) +subparsers = parser.add_subparsers( dest="command", title="commands") #, description="Valid commands" ) # Help parser_help = subparsers.add_parser("help", help="Print this help") @@ -58,6 +58,11 @@ args = parser.parse_args() if(args.verbose): logging.bascConfig(level=logging.DEBUG) +# If we were asked for help, let's give some +if args.command in [ "help", None ]: + parser.print_help() + exit() + # Let's check that the rootdir exists if(not os.path.isdir(args.rootdir)):