diff --git a/main b/main index a04bfda..60b0b31 100755 --- a/main +++ b/main @@ -7,6 +7,9 @@ from os import path as ospath; from os import system as ossystem; import sys; +import re; + +grpMatcher = re.compile(r'^:(.+):$'); # get absolute path @@ -20,10 +23,9 @@ def showhelp(): print; print "\033[1mSYNOPSIS\033[0m" print "\tapt-plus "; - print "\tapt-plus -g "; - print "\tapt-plus --gropu "; + print "\tapt-plus :: "; print; - print "\t-g, --group "; + print "\t"; print "\t\tProccess actions within a specific group (applies to: install, purge, remove, list, deb install)."; print; print "\033[1mDESCRIPTION\033[0m" @@ -75,9 +77,10 @@ if ( len(sys.argv) > 1 ): #--------------------------------------------------------# OPTGROUP = None; ARGS = sys.argv; - if( len(sys.argv) > 2 and sys.argv[1] == "-g" or sys.argv[1] == "--group" ): - OPTGROUP = sys.argv[2]; - ARGS = ARGS[0:1] + ARGS[3:]; + match = grpMatcher.search(sys.argv[1]); + if( len(sys.argv) > 2 and match != None ): + OPTGROUP = match.group(1); + ARGS = ARGS[0:1] + ARGS[2:]; # (2) Normal arguments #--------------------------------------------------------#