Skip to content

Commit ea6fbe3

Browse files
committed
#294 - sz_command removes multiple consecutive spaces in record_id for add_record
1 parent 6e7ef97 commit ea6fbe3

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning].
77

88
## [Unreleased]
99

10+
## [0.0.32] - 2025-11-12
11+
12+
### Fixed in 0.0.32
13+
14+
- `add_record` using a `record_id` with multiple consecutive spaces added the record but with only 1 space in `record_id`
15+
1016
## [0.0.31] - 2025-09-11
1117

1218
### Fixed in 0.0.31

sz_tools/sz_command

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ CMDS_NOT_TO_SET_LAST_COMMAND = [
8080
"response_to_file",
8181
]
8282

83-
8483
CONFIG_SETTINGS: Dict[str, Dict[str, Any]] = {
8584
"format_json": {
8685
"values": ["off", "on"],
@@ -2086,10 +2085,8 @@ class SzCmdShell(cmd.Cmd):
20862085

20872086
def remove_per_cmd_settings(self, cmd_line: str) -> str:
20882087
"""Remove any settings from a command"""
2089-
cmd_list = [c for c in cmd_line.split() if c.lower() not in PER_CMD_SETTINGS]
2090-
cmd_line_cleaned = " ".join(cmd_list)
2091-
2092-
return cmd_line_cleaned
2088+
cmd_list_clean = [c for c in self.parse(cmd_line) if c.lower() not in PER_CMD_SETTINGS]
2089+
return shlex.join(cmd_list_clean)
20932090

20942091
def parse(self, argument_string: str) -> List[str]:
20952092
"""Parses command arguments into a list of argument strings"""

0 commit comments

Comments
 (0)