refine the documentation, add extra warning messages
[lunaix-os.git] / lunaix-os / scripts / build-tools / shared / shconfig / main.py
index 5e7c9165e6cc6a49f6f9379db1b51da64abc311c..216e8e638dff8821de58f12fe2a8ed09296025d8 100644 (file)
@@ -1,5 +1,6 @@
 import readline, textwrap
 
+from shlex          import split as shsplit
 from rlcompleter    import Completer
 from lcfg2.config   import ConfigEnvironment
 from .common        import ShconfigException, get_config_name
@@ -30,7 +31,7 @@ def next_input(cmds: Commands):
     if len(line) == 0:
         return True
     
-    parts = line.split(' ')
+    parts = shsplit(line)
     name, args = parts[0], parts[1:]
 
     if name in ['q', 'exit']:
@@ -76,5 +77,4 @@ def shconfig(env: ConfigEnvironment):
         except KeyboardInterrupt as e:
             return False
         except Exception as e:
-            raise e
           return False
+            raise e
No newline at end of file