File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1818@click .pass_context
1919@click .option ('--testing' , is_flag = True , help = 'Enable testing mode for the watcher' )
2020@click .option ('--verbose' , is_flag = True , help = 'Enable verbose logging for the watcher' )
21- def cli (ctx , testing , verbose ):
21+ @click .option ('--version' , is_flag = True , help = 'Show version information' )
22+ def cli (ctx , testing , verbose , version ):
2223 """aw-nextblock: Flexible time blocking for ActivityWatch
2324
2425 Run without commands to start the watcher process.
2526 Use commands for session management.
2627 """
28+ if version :
29+ click .echo (f"aw-nextblock v{ __version__ } " )
30+ ctx .exit ()
31+
2732 ctx .obj = {
2833 'testing' : testing ,
2934 'verbose' : verbose
@@ -125,13 +130,7 @@ def stop():
125130 click .echo ("No active session found" , err = True )
126131 sys .exit (1 )
127132
128- @click .command ()
129- def version ():
130- """Show version information"""
131- click .echo (f"aw-nextblock v{ __version__ } " )
132-
133133cli .add_command (start )
134134cli .add_command (next )
135135cli .add_command (status )
136136cli .add_command (stop )
137- cli .add_command (version )
You can’t perform that action at this time.
0 commit comments