tenseleyflow/shtick / 95d0a1d

Browse files

stable

Authored by espadonne
SHA
95d0a1dc241114d7051193883ddce6646da99e48
Parents
ec1f957
Tree
bffae8f

1 changed file

StatusFile+-
M src/shtick/generator.py 5 8
src/shtick/generator.pymodified
@@ -72,7 +72,7 @@ class Generator:
7272
 
7373
                     f.write(line)
7474
 
75
-    def generate_all(self, config: Config, interactive: bool = False) -> None:
75
+    def generate_all(self, config: Config, interactive: bool = True) -> None:
7676
         """Generate shell files for all groups in config"""
7777
         if not config.groups:
7878
             print("No groups found in configuration")
@@ -143,7 +143,7 @@ class Generator:
143143
                     f.write("# No active groups\n")
144144
 
145145
     def _print_usage_instructions(
146
-        self, config: Config, interactive: bool = False
146
+        self, config: Config, interactive: bool = True
147147
     ) -> None:
148148
         """Print usage instructions for the user"""
149149
         active_groups = config.load_active_groups()
@@ -233,15 +233,13 @@ class Generator:
233233
                 "Enter shell numbers or names (space-separated): "
234234
             ).strip()
235235
             if not user_input:
236
-                print("No selection made, showing default instructions.")
237
-                self._print_default_instructions()
236
+                print("No selection made, skipping sourcing instructions.")
238237
                 return
239238
 
240239
             selected_shells = self._parse_shell_selection(user_input, shells)
241240
 
242241
             if not selected_shells:
243
-                print("No valid shells selected, showing default instructions.")
244
-                self._print_default_instructions()
242
+                print("No valid shells selected, skipping sourcing instructions.")
245243
                 return
246244
 
247245
             print("\nAdd these lines to your shell configuration files:")
@@ -260,8 +258,7 @@ class Generator:
260258
             print("\n" + "=" * 60)
261259
 
262260
         except (KeyboardInterrupt, EOFError):
263
-            print("\nCancelled. Showing default instructions.")
264
-            self._print_default_instructions()
261
+            print("\nCancelled. Skipping sourcing instructions.")
265262
 
266263
     def _parse_shell_selection(
267264
         self, user_input: str, available_shells: List[str]