File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ def toggle(plugin: str):
9999@plugin .command ()
100100@click .argument ("plugin" , type = str )
101101@click .argument ("function" , type = str )
102- def run (plugin : str , function : str ):
102+ @click .argument ("args" , nargs = - 1 , type = str ) # Accepts zero or more arguments
103+ def run (plugin : str , function : str , args : tuple [str , ...]):
103104 """Run a command available in a plugin"""
104105 plugin_dir = _get_plugin_directory ()
105106 plugins = get_plugins_with_status (plugin_dir )
@@ -113,7 +114,7 @@ def run(plugin: str, function: str):
113114 if hasattr (module , function ):
114115 func = getattr (module , function )
115116 if callable (func ):
116- result = func ()
117+ result = func (* args )
117118 print (result )
118119 else :
119120 click .secho (f"{ function } in { module } is not callable." )
You can’t perform that action at this time.
0 commit comments