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):
99
99
@plugin .command ()
100
100
@click .argument ("plugin" , type = str )
101
101
@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 , ...]):
103
104
"""Run a command available in a plugin"""
104
105
plugin_dir = _get_plugin_directory ()
105
106
plugins = get_plugins_with_status (plugin_dir )
@@ -113,7 +114,7 @@ def run(plugin: str, function: str):
113
114
if hasattr (module , function ):
114
115
func = getattr (module , function )
115
116
if callable (func ):
116
- result = func ()
117
+ result = func (* args )
117
118
print (result )
118
119
else :
119
120
click .secho (f"{ function } in { module } is not callable." )
You can’t perform that action at this time.
0 commit comments