File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,13 @@ def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]
6060 description = "File to load and execute at start" ,
6161 default = None ,
6262 optional = True ,
63- )
63+ ),
64+ requirements .BooleanRequirement (
65+ name = "script-only" ,
66+ description = "Exit volshell after the script specified in --script completes" ,
67+ default = False ,
68+ optional = True ,
69+ ),
6470 ]
6571 return reqs + [
6672 requirements .TranslationLayerRequirement (
@@ -135,6 +141,9 @@ def in_prompt_tokens(self, cli=None):
135141 if self .config .get ("script" , None ) is not None :
136142 self .run_script (location = self .config ["script" ])
137143
144+ if self .config .get ("script-only" ):
145+ exit ()
146+
138147 if has_ipython :
139148 self .__console ()
140149 else :
You can’t perform that action at this time.
0 commit comments