Skip to content

Commit d9a1acd

Browse files
committed
Add optional argument -start
With this argument, the CLI can now introduce itself to the new user in an interesting way, giving an introduction to Dynamic CLI. (Just 'start' would have not worked because that would make it a positional argument in argparse which was not the desired outcome.)
1 parent cd7b593 commit d9a1acd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

main.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
version = "0.1"
77

88
parser = argparse.ArgumentParser()
9+
parser.add_argument("-start",
10+
help="introduce you to dynamic",
11+
action="store_true")
12+
913
parser.add_argument("-s",
1014
"--search",
1115
help="enable debug mode",
@@ -34,4 +38,7 @@
3438
search_flag = Search(ARGV)
3539

3640
if __name__ == "__main__":
37-
search_flag.search_args()
41+
if ARGV.start:
42+
print("add an introduction and emojis here")
43+
else:
44+
search_flag.search_args()

0 commit comments

Comments
 (0)