Skip to content

Commit

Permalink
feat: update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemeni11 committed Dec 21, 2024
1 parent 634bc25 commit 51079bb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions TerminalAlert/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import time
from .utils import check_for_update

__version__ = "1.1.0"
__version__ = "1.2.0"

notification = Notify(
default_notification_application_name="TerminalAlert",
default_notification_application_name="TerminalAlert ",
default_notification_icon=join(dirname(realpath(__file__)), 'icons', 'logo.png')
)

Expand Down Expand Up @@ -63,8 +63,8 @@ def terminal_alert(cmd: str) -> None:


def main() -> None:
parser = argparse.ArgumentParser(description="Command Completion AlertsStay Notified, Stay Productive!")
parser.add_argument("command", help="The command to run.")
parser = argparse.ArgumentParser(description="Command Completion AlertsStay Notified, Stay Productive!")
parser.add_argument("command", help="The command to run.", nargs='?')
parser.add_argument(
"-u",
"--update",
Expand All @@ -78,6 +78,9 @@ def main() -> None:
check_for_update(__version__)
sys.exit()

if not args.command:
parser.error("the following arguments are required: command")

terminal_alert(args.command)


Expand Down

0 comments on commit 51079bb

Please sign in to comment.